Hide wall?

Hide wall?

tomi_kosunen
Not applicable
93 Views
5 Replies
Message 1 of 6

Hide wall?

tomi_kosunen
Not applicable

[ FlexSim 21.1.0 ]

Hi. Is it possible to hide a single wall segment? I'd like to hide walls on a selected floor in the building. I can hide other objects (Queue etc) by "switch_hideshape" command but it's not working for the wall segments

0 Likes
Accepted solutions (1)
94 Views
5 Replies
Replies (5)
Message 2 of 6

lars_jacobsen_ScandiSim
Advocate
Advocate
Accepted solution

No, it is not possible. Walls are a unique object that stores and draws walls via code. It isn't a set of regular objects with regular sizes and positions. An option is to move the pillars using code.

0 Likes
Message 3 of 6

tomi_kosunen
Not applicable

One more question: The Wall segments are not following, while the Pillars are moved (only the Pillars are moved). I suppose, the locations/view must be updated somehow. What is the command?

treenode walls = Model.find("Walls").find(">visual/drawsurrogate");

for (int i = 1; i<=walls.subnodes.length; i++){

treenode theWall = walls.subnodes;

Object theWallObj = theWall.as(Object);

theWallObj.location.z = theWallObj.location.z - 10;

}



0 Likes
Message 4 of 6

joerg_vogel_HsH
Mentor
Mentor

The comment as a new question is here

0 Likes
Message 5 of 6

MBJEBZSRG
Advocate
Advocate

Hi Tommi,

The Wall object has an internal function used to update all its walls called "setWallsDirty". This can be used to force-update the information in the wall object such as locations of the pillars, their height and by extention the height of the walls between them, ect...

Object wall = model().find("Walls");  function_s(wall, "setWallsDirty");

This funtion is called by the user interface whenever you use the quickproperties menu to make changes to walls, but just be aware that it is not actually meant to be used during model runtime, so I can't guaratee what will happen if you call it repeatedly.

If you for instance change the position or height of one of the Pillar objects in the drawsurogate of the Walls object, as you point out the drawn walls will not follow, until you call this function. Be aware that if you change the height of a pillar to 0 all walls attached to the pillar will vanish. If you want to hide all walls you could for instance move all pillars in the z-axis below the model floor and call the function.

You can also go to Walls>variable/walls node and here find a reference to all walls between the pillars. On these nodes you can set color and transparancy of a wall and the call the "setWallsDirty" function to update all your wall.

It is not a perfect solution, but it does allow you to make changes to something that was not meant to be changed at runtime.

0 Likes
Message 6 of 6

tomi_kosunen
Not applicable

Thanks Martin. Works perfect for me!

0 Likes