LastCommandResult

Returns the result code for the last executed command.

Syntax

rhinoscriptsyntax.LastCommandResult()

rhinoscript.application.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

import rhinoscriptsyntax as rs

rs.Command( "Line" )

result = rs.LastCommandResult()

if result==0:

    print "The command completed."

else:

    print "The command did not complete."

Also See

Command

IsCommand

LastCommandName