I would like to ask how to find out programatically through C# if there is currently a command waiting for input in the command line and, if so, cancel the current command.
For example, suppose the user typed line. How do you find out if there is something waiting for input in the command line and, if so, cancel it.
Hi @scudelari,
It depends at what point you want to cancel the current command. If you want to cancel as soon as the command is run, then you can subscribe to Command.BeginCommand event, and cancel the command by checking its name
Since there is no event that triggers when Rhino is “InCommand”, we can only do this inside other event handlers. For example, if an object is selected while a command is running
Thanks! I think that the Command.InCommand() is what I was looking for (I was looking for something like this in the RhinoApp class but couldn’t find).