Rhino.ObjectByType BUG?

Hi @Dale,

Looks like the intState in ObjectsByType method (Normal, Locked, Hidden…) does not take into account the objects that are on hidden or locked layers. They are returned as if they were normal objects. Is there any reason for that? I would find it much more useful and logical if the object states dictated by layer properties were reflected.

thanks,

–jarek

These methods take both the object and layer state into account:

NormalObjects
LockedObjects
HiddenObjects

These methods only take the object state into account:

IsObjectNormal
IsObjectLocked
IsObjectHidden
ObjectsByType

Check the help file for details.

Hope this helps.

– Dale

Thanks Dale - I see now that is was intended. Seems to me that ObjectsByType ‘state’ filter would be better used in the first categoty (taking layer states into account), but I guess need to deal with it as-is.

I am trying to quickly get all Mesh objects that are normal or locked but NOT hidden without too many sorting through routines as this needs to be repeated almost real-time in my code, in files with a lot of objects. Would you have any suggestions to do that with current methods available?

thanks,

–jarek

Yes, ISTR having argued for this in the past as well… --Mitch

1 Like

Hi Mitch,

Yeah, I wish you had won that argument :wink:

–jarek