RhinoApp.RunScript - ArgumentOutOfRangeException

Good evening,

we have a test environment setup on our rhino plugin development, which is using RhinoApp.RunScript. I just updated to the latest Rhino version (Version 7 SR17

[7.17.22102.5001, 2022-04-12] and we are experiencing an ArgumentOutOfRangeException when sending _Undo to the command line. Did there any changes happen to the command line behavior?


What is weird, when setting back the execution by dragging the little yellow arrow in VS the code runs. I hope the gif explains the behaviour.


My bad. It seems, when the Undo stack is empty the Command throughs an ArgumentOutOfRangeException. I was expecting to get a false back.

Is that the expected behaviour?


I don’t believe that is the expected behavior, but it is hard to tell. Do you have something simple we can run to repeat this exception?

No I don’t and it seems like hard to reproduce. What I think is happening:

  • Run a RhinoApp.RhinoScript - -_Copy with point from, point to … and so on but actually dont have anything selected, so nothing gets copied, but the command still executes
  • Again RhinoScript - -_Undo that and I get this error.

I fixed our code now, so we handle this accordingly.