Variation name as caption text in rack panel?

How can I have a variation name as text in rackspace panel (different text for each variation under same rackspace)?

I know I can use [value] to display value as caption - is there something as [variation_name] to show caption of variation name?


Hi @danijell and welcome to our community!
You can only do this by using a small snippet of GPScript… and the script has to be in each rackspace!

First, place a Textlabel widget onto your rackspace panel, then give it a name for the use in GPScript.
You can do this on the “Advanced” tab of a widget when in edit mode.
2021-05-07 23_57_48-Window
In my script i used the name ‘lblVariationName’ (you can use any name you want, but you’ll have to use the same name in the script then).
Now open the script editor: menu → window → script editor
Then C&P this code into the editor and press the “Compile” button. After that the script should work.

lblVariationName : widget

// Called once when rackspace is first loaded
    SetWidgetLabel(lblVariationName, GetVariationName(GetCurrentVariation()))

// Called when you switch variations
On Variation(oldVariation : integer, newVariation : integer)
    SetWidgetLabel(lblVariationName, GetVariationName(newVariation))

…hope it helps.
If you have questions, don’t hesitate to ask! :slight_smile: :beers:

EDIT: I added some code, so the script will not only catch the variation’s name when a variation is actually changed, but also at the start of the program.




tnx for a welcome note - I’ve been trying GigPerformer for a few weeks - and decided I can get rid off my HW gear :smiley:

tnx a million for script - it works like a charm :slight_smile:

looking fwd to get to the point I can help newcomers.

keep safe…