Display Names Script
I took this code from Autodesk Help, the code is displaying names of objects in viewport, and I have two questions about how to improve it.
The first question is: I have a group of objects, script shows me the names of every object in this group, but I want it to show me just the name of the group, how to do this?
And the second question is: When script displays the name of camera, it also displays the name of camera target, but I don't want it. How to exclude taget name? I tried something like "if o != Targetobject", but it not helped.
And here is the code:
fn GW_displayObjectNames =
gw.setTransform (matrix3 1)
for o in objects where not o.isHiddenInVpt do
gw.text o.pos o.name color:yellow