question

Fu P avatar image
0 Likes"
Fu P asked Ben Wilson commented

createview of object and show my annotation at same time using Onpress in GUI

I want to create my own user model library so that I can insert my own CAD objects later

For example ,I want to click button inside GUI ,then createview of source1 (in graph1)and show my annotation (in edit1)at the same time.

I know the createview founction [createview(strviewpath[,strobjectfocus,strviewfocus])]

But I don't know how to use it correctly ,because I want the source1(in graph1) can zoom in\ out and rotation .....

Can I createview and show my annotation at the same time?

user model lib.fsm

FlexSim 20.0.9
guiflexsim 20.0.9onpress
example.jpg (137.3 KiB)
user-model-lib.fsm (33.7 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.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Fu P, was jason.lightfoot's answer helpful? If so, please click the red "Accept" button on their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

Here's an example which looks at this area in the Tools folder:

To launch the GUI we need to set the focus to this folder so use the script showm in the model as:

createview("MODEL:/Tools/GUIs/MyLibraryGUI","MODEL:/Tools/MyLibrary","MODEL:/Tools/MyLibrary")

user-model-lib_jl.fsm


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

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

It uses a list box with the items contained withing the library folder and instead of creating the views for descriptions and 3D it changes the viewfocus of the perspective view and the text of the description. Some refresh code is reused from the flowitem bin gui.


0 Likes 0 ·