Is there a way to get result from programmatic command invocation?


Is there a way to retrieve the return value when a command is invoked via RhinoApp.RunScript?

If not, is there another way to invoke commands with RhinoCommon?

(Menno Deij - van Rijswijk) #2

You can subscribe to the Command.EndCommand event (see This has CommandEventArgs as event arguments, in which you find CommandResult

So, subscribe an event handler to EndCommand prior to running with Runscript. Ensure that the command that ends is indeed the command from runscript (compare name). Then you know the result. Lastly: unsubscribe the event handler.