Is GetMultiple() returning a wrong value?

Hello!
Could you please run this short script:

import Rhino
go = Rhino.Input.Custom.GetObject()
go.GetMultiple(0, 0)
result = go.CommandResult()
print result

Even if I press ENTER or SPACE, ‘Cancel’ is returned. Same as when ESC is pressed.

According to the RhinoCommon docs,
https://developer.rhino3d.com/api/rhinocommon/rhino.input.getresult?version=8.x
pressing ENTER should return ‘Nothing’, which I would need, because my command should exit when ESC was pressed, but continue when ENTER was pressed.

Testing on R7 here.

Thanks!

I’m not sure how you get the Nothing passed back, but the following may solve your problem (allowing selection of nothing to be Success):

import Rhino
go = Rhino.Input.Custom.GetObject()
go.AcceptNothing(True)
go.GetMultiple(0, 0)
result = go.CommandResult()
print result
1 Like

Thank you, Nathan!
go.AcceptNothing(True)
did it!