2011
Table Of Contents
- Contents
- Basic Customization
- Custom Linetypes
- Custom Hatch Patterns
- User Interface Customization
- DIESEL
- Command Scripts
- Introduction to Programming Interfaces
- Shapes and Shape Fonts
- Overview of Shape Files
- Create Shape Definition Files
- Shape Descriptions
- Vector Length and Direction Code
- Special Codes
- Use Special Codes
- Codes 0, 1, and 2: End of Shape and Draw Mode Control
- Codes 3 and 4: Size Control
- Codes 5 and 6: Location Save/Restore
- Code 7: Subshape
- Codes 8 and 9: X-Y Displacements
- Code 00A: Octant Arc
- Code 00B: Fractional Arc
- Codes 00C and 00D: Bulge-Specified Arcs
- Code 00E: Flag Vertical Text Command
- Text Font Descriptions
- Sample Files
- Big Font Descriptions
- Unicode Font Descriptions
- Superscripts and Subscripts in SHX Files
- Index
DIESEL
Because DIESEL expressions handle strings exclusively, the USERS1-5 system variables are
useful for passing information from an AutoLISP routine to a DIESEL expression. DIESEL
expressions are evaluated by AutoLISP routines through the use of the AutoLISP menucmd
function.
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 for Mac commands, AutoLISP and ObjectARX
®
routines, and other
macros. 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. Frequently, you can implement a macro more
easily with AutoLISP.
The following examples show two menu items that produce the same result;
one uses DIESEL, and the other uses AutoLISP.
This menu item uses the DIESEL expression:
^C^C^P$M=$(if,$(=,$(getvar,cvport),1),mspace,pspace)
This menu item uses the AutoLISP expression:
^C^C^P(if (= (getvar "cvport") 1)(command "mspace")+
(command "pspace"))(princ) ^P
Both menu items provide a way to switch between paper space and model space
(if TILEMODE is set to 0), but the DIESEL expression is shorter and is evaluated
5
71