Yeah, thanks, I know how to do that with rhinoscriptsyntax… If you dive down into selection.py and look at the GetObject() method, it looks pretty complex in RhinoCommon… Again, as per some earlier posts, I’m looking to combine object selection with other options simultaneously instead of serially, hence RhinoCommon Custom.GetObject() and not rs.GetObject().
–Mitch
Edit: OK, I got it… It was actually as simple as using the same custom_filter you use for the rhinoscriptsyntax version and just calling it inside my go with SetCustomGeometryFilter():
def circ_filt(rhino_object, geometry, component_index):
return geometry.IsCircle()
def GetCircleOrNumber(prompt):
#prompt==command line prompt
#returns None if Esc is pressed or no objects are chosen
#otherwise, returns objectID or value
go = Rhino.Input.Custom.GetObject()
go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve
go.SetCustomGeometryFilter(circ_filt)
go.SetCommandPrompt(prompt)
go.AcceptNumber(True,False)
#etc...