question

Sung Kim avatar image
1 Like"
Sung Kim asked Sung Kim commented

programmatically toggle network view modes

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?

FlexSim 16.0.1
codenetwork nodesview modeprogrammatic controlx-click
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

·
Ben Wilson avatar image
1 Like"
Ben Wilson answered Sung Kim commented
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


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

Sung Kim avatar image Sung Kim commented ·

Thank you, @Ben Wilson!

It works perfectly for my network node! Awesome!!

1 Like 1 ·

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.