TransformCommand

Command
public abstract class TransformCommand : Command

Properties

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.

protected virtual string CommandContextHelpUrl { get; }
inherited fromCommand

EnglishName

Gets the name of the command. This method is abstract.
public abstract string EnglishName { get; }
inherited fromCommand

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.
public bool HistoryReplayOnObjectAttributeChange { get; set; }
inherited fromCommand

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
public virtual Guid Id { get; }
inherited fromCommand

LocalName

Gets the local name of the command.
public virtual string LocalName { get; }
inherited fromCommand

PlugIn

Gets the plug-in where this commands is placed.
public PlugIn PlugIn { get; }
inherited fromCommand

Settings

Gets the settings of the command.
public PersistentSettings Settings { get; }
inherited fromCommand

Methods

DuplicateObjects

#
protected void DuplicateObjects()

OnHelp

Is called when the user needs assistance with this command.
protected virtual void OnHelp()
inherited fromCommand

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.

protected virtual bool ReplayHistory(
replayData
The replay history information.
)
inherited fromCommand
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".
protected void ResetGrips(
list
A list of object to transform. This is a special list type.
)

RunCommand

Executes the command.
protected abstract Result RunCommand(
doc,
The current document.
mode
The command running mode.
)
inherited fromCommand
The command result code.

SelectObjects

#
Selects objects within the command.
[CLSCompliant(false)] protected Result SelectObjects(
prompt,
The selection prompt.
ObjectType
filter,
Geometry filter to limit selection. Use function above if you do not need specific types.
list
A list of objects to transform. This is a special list type.
)
The operation result.

SelectObjects

#
Selects objects within the command.
protected Result SelectObjects(
prompt,
The selection prompt.
list
A list of objects to transform. This is a special list type.
)
The operation result.

TransformObjects

#
protected void TransformObjects(
list,
xform,
copy,
autoHistory
)