question

Jeremy R avatar image
0 Likes"
Jeremy R asked Felix Möhlmann edited

Hide name of 3D object using FlexScript

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?

FlexSim 21.2.3
tree3d objectname
5 |100000

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

Felix Möhlmann avatar image
4 Likes"
Felix Möhlmann answered Felix Möhlmann edited

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.

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

Jeremy R avatar image Jeremy R commented ·
@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).
1 Like 1 ·
Kenny Macleod avatar image
3 Likes"
Kenny Macleod answered Felix Möhlmann converted comment to answer

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.

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

Jeremy R avatar image Jeremy R commented ·
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 0 ·

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.