Python rs.ObjectsByType() bug

Hi @Alain,

there seems to be a “bug” with rs.ObjectsByType() method in python, it does not list any objects placed on hidden layers. eg. using the code below:

ids = rs.ObjectsByType(8 + 16 + 32, state=0)

with state=0, i get zero objects returned, compared to RhinoScript (vb), when i use this code:

Call Main()
Sub Main()
    Dim objs
    objs = Rhino.ObjectsByType(8 + 16 + 32)
    If IsNull(objs) Then 
        Rhino.Print "No Objects found"    
        Rhino.Print "Objects found: " & UBound(objs) + 1
    End If
End Sub

Objects on hidden layers are returned. IMHO Python behavior should not be different to RhinoScript (vb).

What do you think ?


This seems related

Hi Clement,

Sorry the fix hasn’t made it’s way to Rhino 5 but it has been fixed in our code base as you can see following menno’s link. I’ll tag it so it’s included in SR13 if there is one.


Thank you Menno and Alain, i am looking forward for the fix to make it into SR13 if there is one.