July 5, 2023 at 6:20 pm
Subscriber
@Aniket
Sorry, I did not clarify that I did not provide the body name (since it is variable/changing).
I was able to get it working with:
selection = Selection.Create([body for body in GetRootPart().GetAllBodies() if body.Parent.GetName() == ComponentName])
visibility = VisibilityType.Show
inSelectedView = False
faceLevel = False
ViewHelper.SetObjectVisibility(selection, visibility, inSelectedView, faceLevel)
Which I think implements the logic suggested by @mjmiddle
Thanks!