Aron T.
Aron T.

Reputation: 448

Visibility of multiple levels

In my model in Anylogic I tried to create a navigation tool to switch in visibility between floors and navigate through the 2D and 3D visualization.

I did this by creating buttons which are coded like:

navigate( viewLogic );
Ground0.setVisible( true );
Ground1.setVisible( true);
Ground2.setVisible( true);
Ground3.setVisible(true);

Where the viewlogic is the 2D view area and all grounds in this specific example are put on visible.

Only it seems only to work for my 2D model and not my 3D visualization.

When I for example do this:

navigate( view3D );
Ground1.setVisible(true);
Ground0.setVisible(true);
Ground2.setVisible(false);

Still all the floors are visible in the 3D view of the model during simulation.

What am I doing wrong?

Upvotes: 2

Views: 86

Answers (1)

Jaco-Ben Vosloo
Jaco-Ben Vosloo

Reputation: 3975

I tested this in a simple model and all works as expected using the setVisible() functionality

enter image description here

If you use the setVisible() code you must not set the dynamic visibility properties of your shape as it will override any manual setting

enter image description here

Upvotes: 1

Related Questions