Using macros in .cui files
Using macros in .cui files
Macros in .cui files can run commands with custom options for tool palettes, menus, the ribbon (for versions that have a ribbon), toolbars, keyboard shortcuts, and aliases. For example:
^C^C^CZOOM;E;QSAVE;QPRINT
This example zooms to extents, saves the file, and then prints the file.
You can add macros to .cui files manually using a text editor and also in the Properties area of the Customize dialog box. For example, to add a macro to a menu item, see Setting properties of menu items.
The following table describes special characters that can be included in macros that are used in .cui files.
|
Character |
Description |
|
; ^M |
Equivalent to pressing the Enter key. For example, adding ; or ^M advances to the next prompt: _DRAWORDER;_BACK _DRAWORDER^M_BACK |
|
^C |
Equivalent to pressing the Esc key. Adding three ^C (Ctrl+C) characters before a command cancels any active commands or dialog boxes. For example: ^C^C^C_LINE Note that ^C is ignored if used outside of a command; it doesn't clear the selection. |
|
^ |
Equivalent to pressing the Ctrl key. Adding a carrot before a character runs the equivalent shortcut, for example, to toggle entity snapping on or off: ^B |
|
^^ |
Suppresses the display of all prompts and input for the subsequent command. |
|
^Q |
Suppresses the display of all prompts and input for all subsequent commands. |
|
blank space |
Equivalent to entering a space, for example, a blank space between commands is the same as pressing the Spacebar or the Enter key. |
|
. |
Accesses the original or default command if it was undefined using the Undefine command. For example: .LINE |
|
_ |
Uses the default English translation for subsequent commands and options. This allows the macro to run on all languages. For example: _ARC |
|
- |
Runs the command line version of the command instead of the dialog box version. This is useful when running commands in scripts. For example: -BOUNDARY |
|
Runs the command transparently, i.e., within a running command. For example: _LINE;\_COLOR |
|
|
* |
Repeats the subsequent command or entire macro until another command is run or the user cancels it. For example: *CIRCLE |
|
=* |
Displays the current top-level user interface item. |
|
$ |
Starts a DIESEL routine. For example: $M=$(getvar,cmdnames) |
|
@ |
Inputs the coordinates of the previously specified point. For example: _CIRCLE;@_DIAMETER3 |
|
^B |
Turns snaps on or off by toggling the SNAPMODE system variable. For example: ^B_CIRCLE; |
|
^F |
Forces a cancel. Can be used outside of a command to clear a selection. |
|
^E |
Sets the isometric plane to the next option (Top, Right, or Left) by setting the SNAPISOPAIR system variable. Equivalent to F5 and Ctrl+E. |
|
^G |
Turns the reference grid on or off by toggling the GRIDMODE system variable. Equivalent to F7 and Ctrl+G. |
|
^O |
Turns orthogonal mode on or off by toggling the ORTHOMODE system variable. Equivalent to F8 and Ctrl+L. |
|
^P |
Turns menu echo mode on or off by setting the MENUECHO system variable. |
|
^T |
Turns tablet mode on or off by toggling the TABMODE system variable. |
|
^V |
Activates the next viewport which affects the CVPORT system variable. |
en
italiano
čeština
Deutsch
français
hrvatski
magyar
polski
српски
русский
中文
中文
한국어
español