If I run just the GetOneObject code or the GetMultipleObjects the code works just fine, but if I run both then Rhino skips GetMultipleObjects. I know sometimes the scripting engine gets stuck and produces odd results. I have reset the scripting engine and rebooted with the same results. Why would the code cause other lines to be skipped?
import Rhino
if __name__ == '__main__':
filter = Rhino.DocObjects.ObjectType.Curve
# Get one object
sourceresult, sourceobjref = Rhino.Input.RhinoGet.GetOneObject("Select the source curve:", False, filter)
print 'GetOneObject Result: ' + str(sourceresult)
# Get multiple objects
destresult, destobjref = Rhino.Input.RhinoGet.GetMultipleObjects("Select desitnation curves:", False, filter)
print 'GetMultipleObjects: ' + str(destresult)
The easy-to-use RhinoGet.GetOneObject and RhinoGet.GetMultipleObjects are great methods when you only need to pick one set of objects. But in the cases where you need to pick more than one set, these methods don’t allow you to control pre-selection or post select, and whether or not you want pre-selected objects deselected. You’ll need to use GetObject instead.