TransformCommand
CommandProperties
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.
EnglishName
Gets the name of the command. This method is abstract.
HistoryReplayOnObjectAttributeChange
By default, object attribute changes do not trigger history replay. Set this property to true, typically in the command's constructor, if you want objects created with this command to trigger history replay when their attributes change.
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
Methods
DuplicateObjects
#Parameters:
| list (TransformObjectList) |
OnHelp
protected virtual void OnHelp()
Is called when the user needs assistance with this command.
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.
Parameters:
| replayData (ReplayHistoryData) | The replay history information. |
Returns: true if the operation succeeded.
The default implementation always returns false.
ResetGrips
#Sets dynamic grip locations back to starting grip locations. This makes things like the Copy command work when grips are "copied".
Parameters:
| list (TransformObjectList) | A list of object to transform. This is a special list type. |
SelectObjects
#[CLSCompliant(false)]
protected Result SelectObjects(string prompt, ObjectType filter, TransformObjectList list)
Selects objects within the command.
Parameters:
| prompt (string) | The selection prompt. |
| filter (ObjectType) | Geometry filter to limit selection. Use function above if you do not need specific types. |
| list (TransformObjectList) | A list of objects to transform. This is a special list type. |
Returns: The operation result.
SelectObjects
#Selects objects within the command.
Parameters:
| prompt (string) | The selection prompt. |
| list (TransformObjectList) | A list of objects to transform. This is a special list type. |
Returns: The operation result.
TransformObjects
#protected void TransformObjects(TransformObjectList list, Transform xform, bool copy, bool autoHistory)
Parameters:
| list (TransformObjectList) | |
| xform (Transform) | |
| copy (bool) | |
| autoHistory (bool) |