question

Manuel Sinco avatar image
0 Likes"
Manuel Sinco asked Manuel Sinco commented

Change Combobox options with code

Hello, I want to change the values inside the combobox using code in a dashboard GUI.

Currently I was able to change the values in the table, from the active view; however, when the Edit Mode is off and I change the values, they won't update. Here is an example of my code:

  1. treenode combo = gui.subnodes["GraphPanel"].subnodes["Combobox_StaPath"].first;
  2. treenode items_ = combo.find(">items");
  3. items_.subnodes.clear();
  4. items_.subnodes.assert("value_01",1);
  5. items_.subnodes.assert("value_02",2);
  6. items_.subnodes.assert("value_05",5);

the gui treenode was already defined and matches to the dashboard that is already the GUI.

So the table for the combobox is this one:

However it doesn't update and appears like this:

It will update until I turn on the Edit Mode and click in the table to this:

However I want it to update automatically due to that this will change every time I update some values.

I already updated the table in the background, the only missing step is to update the view of the table in the GUI dashboard.

I would appreciate your help.

Thank you,

Manuel.

FlexSim 19.1.2
flexsim 19.1.2
1618330132637.png (1.6 KiB)
1618330175995.png (1.6 KiB)
1618330579170.png (2.1 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Julio R avatar image
0 Likes"
Julio R answered Manuel Sinco commented

Hello @Manuel Sinco,

Can you send us your model to try a few things? If it has information that cannot be shared and you can delete everything but that dashboard that would be enough.

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.