2023-05-09 11:15 AM - edited 2023-05-11 09:51 AM
Hi all,
Is there some way to get the Hotspot Display Parameter to show a Values{2} Description instead of the numeric expression?
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-05-11 01:38 AM - edited 2023-05-11 01:38 AM
If you've used arrays to populate your VALUES{2} definitions, then you should be able to refer to your description array in the displayParam of the moving hotspot.
2023-05-11 04:08 AM
Hi Ling,
I agree with Bruce, arrays are a great way to control this kind of thing. Are you trying to display you Values list when you are dragging your hotspot, as opposed to the index? Please see attached image.
2023-05-11 05:21 AM
VALUES{2} "marker_flip" 1, "Top", -1, "Bottom"
Description array? This parameter is actually using a Length Type as it was inverting at -0.5 instead of 0 when it was an Integer Type...
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-05-11 09:18 AM
How you have declared the VALUES{2} is fine, given there are only two values. However, because you want to display a text value for a numerical parameter during hotspot editing, it gets a little more complicated. What you need to do is create a text parameter that gets filled with the value you want to display. E.g. you would declare a parameter called, say "marker_flip_desc". When marker_flip gets changed, marker_flip_desc gets changed in the parameter script to update to the value you want to display. Creating arrays for your indexes and descriptions helps with this process.
I've attached an object with two different ways to achieve what you need (I've deliberately left in the precision error to keep the code as simple as possible). Hope it helps.
2023-05-11 09:51 AM - edited 2023-05-11 10:03 AM
What you need to do is create a text parameter that gets filled with the value you want to display.
Yeah, that was what I was wanting to avoid as I already have a lot of dynamic arrays which have alot of different ways to be updated... was hoping there was some other way. Barry brought that up in a different post when I was having issues with how AC rounds value inputs. I had thought I might have been able to use an inline variable, but you cannot seem to use those as a display parameter...
DIM toggle[]
IF sg_gridToggle[i][1] = 1 then
toggle[i] = "Show"
else
toggle[i] = "Hide"
endIF
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-05-11 10:00 AM
Hi Ling,
Not quite sure what you are trying to achieve here. But if you are trying to get the Values list options to show and display as you are dragging, then you can always make 2 values statements. One for a string and one for an integer. You can use an IF statement to link these parameters so that they are always being updated when each one is changed. You can allocate the "Integer" values list to the value in your hotspot and the "String" values list to the display parameter in your hotspot.
I have attached an example. But not sure if this is what you are trying to do.
Cheers,
Shaun.
2023-05-11 05:30 PM
Well yeah. Since the hotspot command wants to have a parameter for displaying, you can't use parvalue_description or other shenanigans.... You will sadly need to resort to doubling the parameter and have one just for displaying the string...