question

Enrique Elizaga avatar image
0 Likes"
Enrique Elizaga asked Matthew Gillespie edited

how to find my active perspective view from dashboard GUI?

Hi, guys.

I'm creating some GUIs for my model. When I try to use some cold links that point to the perspective view I am using, they don't work (specifically toggle connections and ignore objects checkboxes). If I use the GUI as a popup, it works great. The problem only happens when I use my GUI locked as a Dashboard (see picture):

I'm using the following code on press. For toggle connections:

treenode activedoc = activedocumentnode();
set(viewhideallconnectors(activedoc), not(get(viewhideallconnectors(activedoc))));
repaintall();

and for toggle ignore objects:

treenode activedoc = activedocumentnode();
set(viewignoreobjects(activedoc), not(get(viewignoreobjects(activedoc))));
repaintall();

Thanks in advance!

FlexSim 18.2.2
guiperspective viewviewfocus
recorte.jpg (186.1 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

Phil BoBo avatar image
2 Likes"
Phil BoBo answered Phil BoBo edited

When you click in the Dashboard, it becomes the active document view.

The active document view is shown with a highlighted blue tab, and the library and quick properties show context-sensitive content depending on the active document view's window type:

Use this code to get the first open 3D view:

views().find("active>Documents/Perspective/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.