LastCommandResult

Returns the result code for the last executed command.

Syntax

Rhino.LastCommandResult ()

Parameters

None.

Returns

Number

The result code successful.  The result codes are as follows:

Value

Description

0

Success.  The command successfully completed.

1

Cancel.  The command was cancelled by the user.

2

Nothing.  The command did nothing (but it was not cancelled).

3

Failure.  The command failed (i.e. bad input, computational problem, etc).

4

Unknown command.  The command was not found.

Example

Dim intResult

Rhino.Command "Line"

intResult = Rhino.LastCommandResult

If intResult = 0 Then

Rhino.Print "The command completed."

Else

Rhino.Print "The command did not complete."

End If

Also See

Command

IsCommand

LastCommandName