Is there a way to filter a list of document objects by whether they are on/off? So doc.Objects()
returns a list of IGH_DocumentObject
and since this is an interface, we don’t have access to Hidden
property. I would hate to try and cast all of these interfaces into concrete types. Any easier way that I can get at the Hidden
property?
Ps. I know I can use Reflection like so: (bool) x.GetType().GetProperty("Hidden")?.GetValue(x, null)
but it somehow feels dirty.
Cheers!
-K