SelCommand
For adding nestable whole object and subobject selection commands, derive your command from SelCommand and override the abstract SelFilter and virtual SelSubObjectFilter functions.
Inheritance Hierarchy
System.Object
Rhino.Commands.Command
Rhino.Commands.SelCommand
Namespace: Rhino.Commands
Assembly: RhinoCommon (in RhinoCommon.dll)
Syntax
public abstract class SelCommand : Command
The SelCommand type exposes the following members.
Constructors
Name
Description
Protected Method
SelCommand
Initializes a new instance of the SelCommand class
Properties
Name
Description
Public Property
BeQuiet
Protected property
CommandContextHelpUrl
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.
(Inherited from Command.)
Public Property
EnglishName
Gets the name of the command. This method is abstract.
(Inherited from Command.)
Public Property
Id
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
(Inherited from Command.)
Public Property
LocalName
Gets the local name of the command.
(Inherited from Command.)
Public Property
PlugIn
Gets the plug-in where this commands is placed.
(Inherited from Command.)
Public Property
Settings
Gets the settings of the command.
(Inherited from Command.)
Public Property
TestGrips
Public Property
TestLights
Methods
Name
Description
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected Method
Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected Method
MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected Method
OnHelp
Is called when the user needs assistance with this command.
(Inherited from Command.)
Protected Method
ReplayHistory
Repeats an operation of a command.
In order to make this function work, you will likely need to grab the Result property that gives the list of input objects. Then, you will be able to replace these inputs by using one of the UpdateToX() methods of the ReplayHistoryResult.
You should NOT use any document AddX() or ReplaceX() functions, as they will break history.
(Inherited from Command.)
Protected Method
RunCommand
(Overrides
Command.RunCommand(RhinoDoc, RunMode)
.)Protected Method
SelFilter
Override this abstract function and return true if object should be selected.
Protected Method
SelSubObjectFilter
To select subobjects, override this virtual function, add component indices of the subobjects that should get selected to indicesToSelect list and return true. This is called only if the SelFilter returns false and the whole object does not get selected.
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object.)