It seems that one can show/hide objects only by calling the ObjectTable class from where they belong. Is there an alternative to that?
If not: what should I do if I want to show/hide an object that does not belong to the Rhino.RhinoDoc.ActiveDoc.Objects class?
I considered adding the object to a new ObjectTable but it seems that this class does not have any constructor. Is there no way to instantiate a new ObjectTable? I am kind of stuck here…
I’m confused; the document only knows about objects in the object table and therefore will only attempt to draw those objects. Are you creating custom objects?
From C# Grasshopper, Rhino.RhinoDoc.ActiveDoc.Objects retrieves only the objects which are displayed within the RhinoViewport, dismissing all hidden objects.
So I had to run the ObjectEnumeratorSettings, with the VisibleFilter to false, so I could retrieve all hidden objects. From ObjectEnumeratorSettings, I was only able to retrieve objects as an Array, and not as an ObjectTable.
So far I thought that I had to pass by the ObjectTable class to show/hide any objects.
But I just realized that I can just simply set the object’s Visible property to true, even though the SDK only indicates “get”.
So it’s basically solved. Sorry for the confusion.
Aaah, I see. I got confused because both are on the same level in the SDK.
Maybe I just don’t know how to read this properly
Thanks for the explanation.
Look at the Attributes property. This is a separate class which contains a bunch of additional attributes that a RhinoObject could have. The Visible property on RhinoObject is really just a convenience property so you don’t have to type in the extra word Attributes just to see the visibility state. It was probably a mistake on my part to add this since it causes as much confusion as convenience.