Using more than one filter with RhinoGet.GetOneObject

Not sure if I am not looking in the correct place, but I have not seen anything that can show me how to utilize more than one filter for RhinoGet.GetOneObject()

This is one of the methods that I have tried, and it only takes the first filter as precedence; the other method I made a tuple, that wasn’t able to be passed. Then I am also not sure how to have multiple object types inside of Rhino.Input.Custom.GetObjectGeometryFilter

Any help will be appreciated.

def selectEdge(self):
filter = Rhino.DocObjects.ObjectType.Curve or Rhino.DocObjects.ObjectType.Annotation
objects = Rhino.Input.RhinoGet.GetOneObject(“Select Edge, or Annotation”, False, filter)

if objects[1].Curve():
    objRefGuid = objects[1].ObjectId
    objRef = objects[1].Curve()
    objRefName = rs.ObjectName(objRefGuid)
    
    return objRefGuid, objRef, objRefName
    
if objects[1].TextEntity():
    objRefGuid = objects[1].ObjectId
    objRef = objects[1].TextEntity()
    objRefName = rs.ObjectName(objRefGuid)
    
    return objRefGuid, objRef, objRefName
    
rs.UnselectAllObjects()

Hi Colby,

try to use | to concatenate filters eg:

filter = Rhino.DocObjects.ObjectType.Curve | Rhino.DocObjects.ObjectType.Annotation

_
c.

Hello Clement,

That was exactly what I was looking for, Thank You very much.