question

sachin tandulkar avatar image
1 Like"
sachin tandulkar asked Phil BoBo edited

Can we toggle on and off the background in FlexSim?

Can we toggle on and off the background in FlexSim?

Choose One
backgroundtoggle background
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

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

So you can hide or show objects using the command: switch_hideshape().

switch_hideshape(BackgroundNode,1) (this would hide the object)

switch_hideshape(BackgroundNode,0) (this shows the object.)

Replace BackgroundNode with a reference to your own background object. You can find the node from your model tree.

You could also add this hide/show logic to buttons on a Dashboard to make it more accessible.

I've attached a simple model demonstrating this.

hidebutton.fsm


hidebutton.fsm (12.5 KiB)
· 3
5 |100000

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