programmatically toggle network view modes

programmatically toggle network view modes

sung_kim
Not applicable
22 Views
2 Replies
Message 1 of 3

programmatically toggle network view modes

sung_kim
Not applicable

[ FlexSim 16.0.1 ]

When you X-click a network node, the network cycles through different view modes, allowing you to show or hide the network.

Is there a way I can select a different network view mode through code?

Accepted solutions (1)
23 Views
2 Replies
Replies (2)
Message 2 of 3

Ben_WilsonADSK
Community Manager
Community Manager
Accepted solution
function_s(netnode, "setViewMode", viewmode);

For the parameters:

  • netnode is a reference to one of the network nodes in your model
  • "setViewMode" shouldn't change. It specifies the function to run
  • viewmode is an integer 1, 2 or 3, for the different view modes show all, show edges, show nothing

248-networkviewmodes.gif

Message 3 of 3

sung_kim
Not applicable

Thank you, @Ben Wilson!

It works perfectly for my network node! Awesome!!