The MODEMACRO system variable controls the user-defined area on the status line. This variable is set to the null string when you start AutoCAD LT. It is not saved in the drawing, the configuration file, or anywhere else.
MODEMACRO is a user-string variable. It can be set to any string value. A maximum string length of 460 characters should work on all systems. You can set MODEMACRO with SETVAR or by entering modemacro at the Command prompt. If you modify the MODEMACRO setting, you can experiment with various status line formats; however, the maximum number of characters you can enter in this manner is 255.
If MODEMACRO is the null string, which you set by entering a period (.), AutoCAD LT displays the standard status line.
MODEMACRO Values
The simplest, and least useful, MODEMACRO value consists of constant text. For example, to display your company name on the status line, you could enter the following:
Command: modemacro
New value for MODEMACRO, or . for none <"">: Joe's Bar and Grill
This MODEMACRO value always displays the same text; the status line does not reflect changes to the internal state of AutoCAD LT. It does not change until you change MODEMACRO.
To make the status line reflect the AutoCAD LT current state, enter macro expressions using the DIESEL language in the following form:
$(somefun, arg1, arg2, ...)
where somefun is the name of the DIESEL function and arg1, arg2, and so on, are arguments to the function, interpreted according to the function's definition. DIESEL macro expressions have only one data type: strings. Macros that operate on numbers express the numbers as strings and convert back and forth as required.
Now define a more interesting status line--for example, one that shows the current text style name:
Command: modemacro
New value for MODEMACRO, or . for none <"">: Style: $(getvar, textstyle)
Note: This example and those that follow may show the MODEMACRO string continued onto additional lines of text. You enter it as one long string at the Command prompt.
You can retrieve any system variable by entering $(getvar, varname). Its current setting replaces the macro expression on the status line. Then, when you switch text styles, MODEMACRO is reevaluated. If it changes, the new text style name is displayed on the status line.
Expressions can be nested, and they can be as complex as you want. The example that follows displays the current snap value and angle (in degrees) in the status line. It uses nested expressions to convert the snap angle from radians to degrees, while truncating the value to an integer.
Command: modemacro
New value for MODEMACRO, or . for none <"">: Snap: $(getvar, snapunit)
$(fix,$(*,$(getvar,snapang),$(/,180,3.14159)))
You can also display the values in the current linear and angular UNITS modes.
Command: modemacro
New value for MODEMACRO, or . for none <"">: Snap: $(rtos,$(index,0, $(getvar,snapunit))),$(rtos,$(index,1,$(getvar,snapunit))) $(angtos,$(getvar,snapang))
DIESEL copies its input directly to the output until it comes to the dollar sign character ($) or a quoted string. You can use quoted strings to suppress evaluation of character sequences that would otherwise be interpreted as DIESEL functions. You can include quotation marks in quoted strings by using two adjacent quotation marks. In the following example, the current layer is set to LAYOUT, and MODEMACRO is set to the string.
Command: modemacro
New value for MODEMACRO, or . for none <"">: "$(getvar,clayer)= """$(getvar,clayer)""""
The status line then displays the following:
$(getvar,clayer)="LAYOUT"