IsCommand

Verifies that a command exists in Rhino. The function is useful when scripting commands found in 3rd party plug-ins.

Syntax

rhinoscriptsyntax.IsCommand( command_name )

rhinoscript.application.IsCommand( command_name )

Parameters

command_name

Required.  String.  The command name to test.

Returns

Boolean

True if command exists, otherwise False.

Example

import rhinoscriptsyntax as rs

cmdname = rs.GetString("Command name to test")

if cmdname is not None:

    iscmd = rs.IsCommand(cmdname)

    if iscmd:

        print "The", cmdname, "command exists."

    else:

        print "The", cmdname, "command does not exist."

Also See

Command

InCommand