IsCommand

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

Syntax

Rhino.IsCommand (strCommandName])

Parameters

strCommandName

Required.  String.  The command name to test.

Returns

Boolean

True if successful, otherwise False.

Null

On error.

Example

Dim strCommandName, blnResult

strCommandName = Rhino.GetString("Command name to test")

If VarType(strCommandName) = vbString Then

blnResult = Rhino.IsCommand(strCommandName)

If blnResult = True Then

Rhino.Print "The " & strCommandName & " command exists."

Else

Rhino.Print "The " & strCommandName & " command does not exist."

End If

End If

Also See

Command

InCommand