Hide name of 3D object using FlexScript

Hide name of 3D object using FlexScript

jeremy_r
Not applicable
276 Views
4 Replies
Message 1 of 5

Hide name of 3D object using FlexScript

jeremy_r
Not applicable

[ FlexSim 21.2.3 ]

I have a group of 3D objects whose names I want to hide, so that they do not show up in the 3D display. I still want other 3D objects to display their names, so I cannot disable the name display in general—I need to disable the name display on these individual objects.

I was hoping to run a FlexScript command to iterate through my group and change the flag corresponding to the "Show Name" checkbox on the "More Visuals" menu. However, after reviewing all of the subnodes of the 3D object, I was unable to find that node.

Where is the "Show Name" checkbox of the "More Visuals" menu stored in objects in the tree?

0 Likes
Accepted solutions (1)
277 Views
4 Replies
Replies (4)
Message 2 of 5

kenny5DBG9
Contributor
Contributor

I'm not a FlexScript expert but it's easy to do it with menu options.

Just select all relevant objects and use the Edit Selected Objects tab (access via View menu option) to Toggle Show Names.

If you want to turn names off and on, just add them all to a Group first. The group can then be found and selected with a right-click on the 3D space background. Then simply toggle as required.

In the future, you can then select and alter the visuals of the objects in that group with FlexScript.

Message 3 of 5

jeremy_r
Not applicable
Ah, thanks! I already had my objects in a Group, but I haven't use the "Edit Selected Objects" tab before. That does exactly what I was trying to do.
0 Likes
Message 4 of 5

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

Edit: Changed comment to answer by request.

The command so set this flag is "switch_hidelabel(object, num on/off)". A "1" as second parameter will hide the name, a "0" will show it again. Other flags are set with similar command. They can be found by searching for "switch" in the command helper.

Message 5 of 5

jeremy_r
Not applicable
@Felix Möhlmann Could you add that as a separate answer? As helpful as Kenny's answer was, yours is also very useful and answers the specific question I asked (rather than just solving my broader problem).