How to link combobox to global variable?

How to link combobox to global variable?

patrick_zweekhorst
Advocate Advocate
8 Views
2 Replies
Message 1 of 3

How to link combobox to global variable?

patrick_zweekhorst
Advocate
Advocate

[ FlexSim 19.0.0 ]

Hi,

Is it possible to link a combobox in a dashboard to a global variable?
When I only link the combobox to the variable it does not work.
Can I make this work, or do I need to add an extra node in the tree where I will link the combobox to.
The combobox will be the only place where the global variable is changed.

Thank you in advance,

Patrick

(A small example model: combotest.fsm )

0 Likes
Accepted solutions (1)
9 Views
2 Replies
Replies (2)
Message 2 of 3

philboboADSK
Autodesk
Autodesk
Accepted solution

If you just want to be able to set the value, you could put code in the OnSelect of the combo box to set the global variable.

If you want to be able to set the value and get the value (have the combo box show the right option when you open the dashboard or change the global variable's value), then you need to be able to hotlink the control to the global variable's value. You can do this using a regular combo box widget and then using a GUI Class widget in the dashboard to reference that combo box.

See the attached model: 16898-combotest-1.fsm



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 3 of 3

patrick_zweekhorst
Advocate
Advocate

Hi @phil.bobo,

This is what I wanted, thanks for the solution.

0 Likes