question

Meng,Li avatar image
0 Likes"
Meng,Li asked Meng,Li commented

Is there a way to build GUI for flowitems?

FlexSim 21.2.2
flowitemguicustom gui
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 Meng,Li commented

Yes - just set the guifocusclass of the item in the flowitembin to point to the location of your customGUI. Then when you try to interact with the item by double clicking, your custom GUI should open with the viewfocus and objectfocus being set to the item - which you can then refence on any views/links.

Example attached.

exampleFlowitemGUI.fsm


· 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.

Meng,Li avatar image Meng,Li commented ·

Thank you for support. In this model, i have to double click the flowitem to open the GUI you've designed, and must click the close button on the GUI to close it. I am wondering how to open the gui by leftmouth button down, and close it by clicking anyplace in the model?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Meng,Li commented ·

You can add this behaviour to the flowitem's tree:

1646231628128.png

(really you only need the OnClick node somewhere in its attributes tree).

Then in the GUI you should be able to detect OnKillFocus.

0 Likes 0 ·
1646231628128.png (4.4 KiB)
Meng,Li avatar image Meng,Li Jason Lightfoot ♦ commented ·

001.png002.png

exampleflowitemgui.fsm

I modified the model, but can not find the OnKillFocus attribute.

0 Likes 0 ·
001.png (3.9 MiB)
002.png (1.2 MiB)
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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