Click or drag to resize
Command Class
Defines a base class for all commands. This class is abstract.
Inheritance Hierarchy

Namespace: Rhino.Commands
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.1.50000.0 (5.0.20693.0)
Syntax
public abstract class Command

The Command type exposes the following members.

Constructors
  NameDescription
Protected methodCommand
Default protected constructor. It only allows instantiation through subclassing.
Top
Properties
  NameDescription
Protected propertyCommandContextHelpUrl
Gets the URL of the command contextual help. This is usually a location of a local CHM file.

The default implementation return an empty string.

Public propertyEnglishName
Gets the name of the command. This method is abstract.
Public propertyId
Gets the unique ID of this command. It is best to use a Guid attribute for each custom derived command class since this will keep the id consistent between sessions of Rhino GuidAttribute
Public propertyStatic memberLastCommandId
Gets the ID of the last commands.
Public propertyStatic memberLastCommandResult
Gets the result code of the last command.
Public propertyLocalName
Gets the local name of the command.
Public propertyPlugIn
Gets the plug-in where this commands is placed.
Public propertySettings
Gets the settings of the command.
Top
Methods
  NameDescription
Public methodStatic memberDisplayHelp
Displays help for a command.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodStatic memberGetCommandNames
Gets list of command names in Rhino. This list does not include Test, Alpha, or System commands.
Public methodStatic memberGetCommandStack
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 ids of active commands.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodStatic memberGetMostRecentCommands
Gets an array of most recent command descriptions.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberInCommand
Determines if Rhino is currently running a command.
Public methodStatic memberInScriptRunnerCommand
This is a low level tool to determine if Rhino is currently running a script running command like "ReadCommandFile" or the RhinoScript plug-in's "RunScript".
Public methodStatic memberIsCommand
Determines is a string is a command.
Public methodStatic memberIsValidCommandName
Determines if a string is a valid command name.
Public methodStatic memberLookupCommandId
Returns the ID of a command.
Public methodStatic memberLookupCommandName
Returns the command name given a command ID.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnHelp
Is called when the user needs assistance with this command.
Protected methodReplayHistory
Repeats an operation of a command.
Protected methodRunCommand
Executes the command.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventStatic memberBeginCommand
Called just before command.RunCommand().
Public eventStatic memberEndCommand
Called immediately after command.RunCommand().
Public eventStatic memberUndoRedo
Used to monitor Rhino's built in undo/redo support.
Top
See Also