InCommand

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.

Syntax

rhinoscriptsyntax.InCommand( ignore_runners=True )

rhinoscript.application.InCommand( ignore_runners=True )

Parameters

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).

Returns

Number

The number of active commands.

Example

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)."

Also See

Command

IsCommand