Command macros support the use of special characters that are equivalent to pressing a key on the keyboard or for pausing for user input.
For example, the backslash (\) in the following macro pauses for user input and the semicolon (;) represents pressing the Enter key.
^C^C_.text \.4 0 DRAFT Inc;;;Main St.;;;City, State;
The macro starts the TEXT command, pauses so the user can specify an insertion point, and then enters the address on three lines. In the triple semicolon (;;;) sequence, the first semicolon ends the text string, the second repeats TEXT, and the third accepts the default placement below the previous line.
Macros can use the special characters listed in the following table.
Special characters used in macros |
|
---|---|
Character |
Description |
; |
Issues Enter. |
^M |
Issues Enter. |
^I |
Issues Tab. |
[blank space] |
Enters a space; a blank space in command sequences is equivalent to pressing the Spacebar. |
\ |
Pauses for user input (cannot be used with accelerators). |
. |
Allows you to access a standard command even if it was undefined using the UNDEFINE command. (Not available in AutoCAD LT) |
_ |
Translates commands and options that follow from the localized name to the global name. |
=* |
Displays the current top-level pull-down, shortcut, or image tile menu. (Not available on AutoCAD for Mac.) |
* |
Repeats a command until another command is started or the current command is ended. |
$ |
Introduces a conditional DIESEL macro expression ($M=). |
^B |
Turns Snap on or off; equivalent to Ctrl+B (Windows) or Control-B (Mac OS). |
^C |
Cancels the active command or command option; equivalent to pressing Esc. |
^D |
Turns Dynamic UCS on or off; equivalent to Ctrl+D (Windows) or Control-D (Mac OS). |
^E |
Sets the next isometric plane; equivalent to Ctrl+E (Windows). (No equivalent key press on Mac OS) |
^G |
Turns Grid on or off; equivalent to Ctrl+G (Windows) or Control-G (Mac OS). |
^H |
Enters a Backspace. |
^O |
Turns Ortho on or off. |
^P |
Turns MENUECHO on or off. |
^Q |
Suppresses the display of all prompts and input from the Command Line history for the macro. |
^R |
Turns command versioning on or off. Command versioning is required for some commands to ensure the command macro written in an older release works properly in the latest release. |
^T |
Turns the tablet on or off; equivalent to Ctrl+T (Windows). (Not available in AutoCAD for Mac.) |
^V |
Changes the current viewport. |
^Z |
Null character that suppresses the automatic addition of a space being added to the end of the macro. |