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?
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?
I think you just need to add an OnPreOpen node to the GUI and call
standardpreopen(c);
in that node.
Thanks for this! Working on the weekend and was super glad to find this post. I already had code in my OnPreOpen that was looking at other nodes in the GUI. It was throwing errors when I put the standardpreopen command at the start of the code. I could have put the command after that code but I wanted things to execute faster (my other code takes a bit of time). So, I put the following if statement around my code:
standardpreopen(c); if(objectexists(c)){ //more code }
Thanks again,
Brandon
2 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved