2012
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
Introduction to Pro-
gramming Interfaces
AutoLISP
AutoLISP is based on the LISP programming language, which is simple to learn
and very powerful. Because AutoCAD for Mac has a built-in LISP interpreter,
you can enter AutoLISP code at the command prompt or load AutoLISP code
from external files.
Overview of AutoLISP
AutoLISP is an application interface in AutoCAD for Mac that automating of
design tasks. When an AutoLISP application or routine is loaded, it functions
in its own namespace for each drawing that is open. A namespace is an insulated
environment keeping AutoLISP routines that are specific to one drawing from
having symbol or variable name and value conflicts with those in another
drawing. For example, the following line of code sets a different value to the
symbol a for different documents.
(setq a (getvar "DWGNAME"))
AutoLISP applications or routines can interact with AutoCAD for Mac in many
ways. These routines can prompt the user for input, access built-in AutoCAD
for Mac commands directly, and modify or create objects in the drawing
database. By creating AutoLISP routines you can add discipline-specific
commands to AutoCAD for Mac. Some of the standard AutoCAD for Mac
commands are actually AutoLISP applications.
7
77