Your Ad Here

Go to: Synopsis. Flags. Return value. MEL examples.

Synopsis

nameCommand [-annotation string] [-command string] [-data1 string] [-data2 string] [-data3 string] [-default boolean] [objectName]

nameCommand is undoable, queryable, and editable.

This command creates a nameCommand object. Each nameCommand object can be connected to a hotkey. Thereafter, the nameCommand's command string will be executed whenever the hotkey is pressed (or released, as specified by the user).

Flags

annotation, command, data1, data2, data3, default
Long name (short name) [argument types] Properties
-annotation(-ann) string create
A description of the command.
-command(-c) string create
The command that is executed when the nameCommand is invoked.
-default(-d) boolean create
Indicate that this name command is a default command. Default name commands will not be saved to preferences.
-data1(-da1) string
-data2(-da2) string
-data3(-da3) string create
These are optional, user-defined data strings that are attached to the nameCommand object. They can be edited or queried using the assignCommand command.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command

Return value

None

MEL examples

// Create a nameCommand object.
//
nameCommand -ann "The Circle Tool" -c "setToolTo circleContext" circleToolNameCommand;

// Now map the nameCommand to a hotkey.
//
hotkey -keyShortcut "F5" -altModifier -name "circleToolNameCommand";

  

Return to Autodesk Index


Your Ad Here