question

mark zhen avatar image
0 Likes"
mark zhen asked Felix Möhlmann answered

GUI basic setting issues

I have designed a GUI. Its main function is to control rack capacity and waiting time, but I have only completed maybe less than 10%. I would like to ask how I can implement it in the future.0331rack_autosave.fsm

FlexSim 23.0.15
gui
0331rack-autosave.fsm (649.7 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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

If you haven't already done so, I would suggest you read through the documentation on GUIs to familiarize yourself with the basics.

I haven't really worked with GUIs much. So this was good practice for me as well. And the result might not be optimal. Someone with more experience could probably come up with a cleaner implementation.

A short overview of how the GUI now works:

In OnPreOpen the combobox item list gets populated with the names of the objects in the "AllRacks" group. The first object is set as the current item and a reference to it is assigend to the selectedrack node.

capture1.png

The coldlink attributes of the two edit fields use that reference to link to the respective variable of that rack.

capture2.png

In the OnSelect code of the combobox the reference is changed to the newly selected rack and the content of the edit fields is updated accordingly.

capture3.png

The apply attribute makes the Apply button overwrite the linked variable nodes.

I have linked the GUI to a shape object in the model for now. So you can open it by double-clicking on the object.

capture4.png

0331rack-fm.fsm


capture1.png (12.8 KiB)
capture2.png (13.6 KiB)
capture3.png (8.5 KiB)
capture4.png (48.3 KiB)
0331rack-fm.fsm (651.9 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.