Determines if Rhino is currently running a command. Because Rhino allow for transparent commands (commands that can be run from inside of other commands), this method returns the total number of active commands.
rhinoscriptsyntax.InCommand( ignore_runners=True )
rhinoscript.application.InCommand( ignore_runners=True )
ignore_runners |
Optional. Boolean. If true, script running commands, such as LoadScript, RunScript, and ReadCommandFile will not counted. The default is not to count script running command (true). |
Number |
The number of active commands. |
import rhinoscriptsyntax as rs
commands = rs.InCommand()
if commands > 0:
print "Rhino is running", commands, "command(s)."
else:
print "Rhino is not running any command(s)."