Hi!
I’m running into a weird issue:
- I create a headless document and populate it with existing objects using a script.
- Some of the objects are hidden.
- From here I learned that one should use the
GetObjectList()function to iterate over all objects - including hidden objects. - I have then tried to make the hidden objects visible in the headless doc:
- Using
headless.Objects.Show(obj, True) - Setting
obj.Attributes.Mode = ObjectMode.Normaland then callingobj.CommitChanges() - Duplicating the object attributes, setting
ModetoObjectMode.Normaland thenheadless.Objects.ModifyAttributes(obj, attr, True)
- Using
None of these seem to work. When I write and open the headless doc, the hidden objects are there, but they remain hidden. I need to manually call the Show command to reveal them.
Bonus: When I iterate over all the objects, I also call obj.Attributes.WireDensity = -1 to get rid of isolines in the new doc (for legibility). This works for the visible objects but when I manually reveal the hidden objects, they have not been affected. Are attributes of hidden objects not editable? I try to unhide/show the objects before setting the wire density, if that helps…
Am I missing something? Is there another undocumented approach as in the link?
Best,
Tom
2 posts - 2 participants