question

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie asked Brandon Peterson edited

How to create only one instance of a GUI?

I've made a custom GUI for my object. When I double click the object a GUI opens, but if I keep clicking multiple GUIs are opening. How do I make sure that if one instance of GUI is open another instance is not created?

openlotsgui.fsm

FlexSim 17.1.2
gui
openlotsgui.fsm (18.8 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

Matthew Gillespie avatar image
2 Likes"
Matthew Gillespie answered Brandon Peterson edited

I think you just need to add an OnPreOpen node to the GUI and call

  1. standardpreopen(c);

in that node.

openoncegui.fsm


openoncegui.fsm (28.0 KiB)
· 1
5 |100000

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