Untitled

(Steven Felgate) #1

Terminate Macros


Some macros require special terminators. Some commands (TEXT, for example)
require you to press ENTER rather than SPACEBAR to terminate the command.
Some commands require more than one space (or ENTER) to complete, but
some text editors cannot create a line with trailing blanks.


Two special conventions resolve these problems.


■ A semicolon (;) in a macro automatically issues ENTER at the command
prompt.


■ If a line ends with a control character, a backslash (), a plus sign (+), or a
semicolon (;), AutoCAD LT does not add a blank space after it.


An item that ends with a backslash () pauses a macro for user input.


Compare the following macros:


ucs
ucs ;

The first example enters ucs at the command prompt and presses SPACEBAR.
The following prompt is displayed.


Specify origin of UCS or
[Face/NAmed/OBject/Previous/View/World/X/Y/Z/ZAxis] :


The second example enters ucs, presses SPACEBAR, and presses ENTER, which
accepts the default value (World).


Suppress Echoes and Prompts in Macros


Characters in a macro appear in the command window as though you had
typed the characters on the keyboard. They are also displayed in the user
interface element. This display duplication is called “echoing”. You can
suppress the “echoed” displays with the MENUECHO system variable. If echoes
and prompts from item input are turned off, a ^P in the item turns them off.


Create Long Macros


You can create a macro of any length, without requiring any special characters
at the end of a line. The Properties pane in the Customize User Interface (CUI)
Editor accepts a macro of any length.


Create Macros | 103

Free download pdf