question

Rocio A avatar image
0 Likes"
Rocio A asked Rocio A commented

Redirect selected object to the GUI

Hello,

I have a question regarding the GUI.

In the tutorial it says: once you have associated an operator with the GUI and double click on the operator to open this window, the objectfocus attribute will change. You will specify a route to the operator you are editing. For example, you have associated an operator named Bob with this GUI. When you double-click Bob, this GUI is instantiated and its objectfocus attribute is set to the string path: "MAIN:/project/model/Bob".

https://docs.flexsim.com/en/24.1/Reference/DeveloperAdvancedUser/GUIs/KeyConceptsGUIs/KeyConceptsGUIs.html

Gui redirect ejemplo.fsm

However, my model in the objectfocus does not have the /Bob added.

Why does this happen?

And another question, is it possible to detach the object from the GUI?

Thank you

FlexSim 24.1.1
guitreeredirectobjectfocus
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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Rocio A commented

The GUI instance is correctly pointing to the third node in the model - 'Bob':

1727955526009.png

However this isn't ideal in my view - if the model ranks are changing with the GUI open then the gui could end up changing the wrong object. It is better to add coupling data (press P) to the node so that it stores a pointer to the object instead:

1727955653445.pngAlso note that you need to explore the structure of the instantiated GUI to check these values - not the one that you define in Tools/GUIs.


1727955526009.png (3.8 KiB)
1727955653445.png (4.2 KiB)
· 5
5 |100000

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

Rocio A avatar image Rocio A commented ·

Hello @Jason Lightfoot ,

In the model that I shared, the numbers that accompany the GUIs of your images do not appear.

I don't understand why /BOB doesn't appear in my model.

I attach some images of what I see in my model

Thank you

1728034125723.png

0 Likes 0 ·
1728034125723.png (100.4 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Rocio A commented ·

"Also note that you need to explore the structure of the instantiated GUI to check these values - not the one that you define in Tools/GUIs."

Right click on the GUI that opens when you double click Bob and choose "Explore Structure"

0 Likes 0 ·
Rocio A avatar image Rocio A Jason Lightfoot ♦♦ commented ·

Hello @Jason Lightfoot ,

I have made a video with the steps you have indicated and what appears in your images does not appear.

and I don't understand what you mean with what you explained to me in the previous answer:

"However, this is not ideal in my opinion: if the model ranges change with the GUI open, then the GUI could end up changing the wrong object. It is better to add docking data (press P) to the node so that it stores a pointer to the object instead:"

Thanks in advance

0 Likes 0 ·
bob.mp4 (221.8 KiB)
Show more comments