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 displays the following:
$(getvar,clayer)="LAYOUT"
Quick Reference
Commands
SETVAR
Lists or changes the values of system variables.
System Variables
MODEMACRO
Displays a text string on the status line, such as the name of the current
drawing, time/date stamp, or special modes.
DIESEL Expressions in Macros
You can use DIESEL string expressions in customization (CUI) files as an
additional method of creating macros.
These expressions can return string values (text strings) in response to standard
AutoCAD LT commands. They can also return string values to the menu itself,
thereby altering the appearance or content of a menu label.
A DIESEL expression that you use in a menu item must follow the
$section=submenu format where the section name is M and the submenu is
the DIESEL expression you want.
Consider the following example:
^C^C^P$M=$(if,$(=,$(getvar,cvport),1),mspace,pspace)
This string provides a way to toggle between paper space and model space if
TILEMODE is set to 0. This expression is evaluated transparently. If the special
character ^P (which toggles MENUECHO on and off) is omitted, the expression
displays only the issued command.
328 | Chapter 5 DIESEL