2012
Table Of Contents
- Contents
- Basic Customization
- Overview of Customization
- Organize Program and Support Files
- Customize a Publish to Web Template
- Define Custom Commands
- Record and Modify Action Macros
- Custom Linetypes
- Custom Hatch Patterns
- User Interface Customization
- Understand User Interface Customization
- Work with the Customize User Interface (CUI) Editor
- Create and Manage Customization Files
- Customize Commands
- Overview of Commands
- Create, Edit, and Reuse Commands
- Create Macros
- Overview of Macros
- Use Special Control Characters in Macros
- Pause for User Input in Macros
- Provide International Support in Macros
- Use Built-in Commands in Macros
- Repeat Commands in Macros
- Use Single Object Selection Mode in Macros
- Use Macros to Swap User Interface Elements
- Use Conditional Expressions in Macros
- Use AutoLISP in Macros
- Control the Display of Command Items
- Assign Search Tags
- Create Tooltips and Extended Help for Commands
- Create Status Line Help Messages
- Create and Manage Images for Commands
- Customize User Interface Elements
- Load an AutoLISP File
- Customize Workspaces
- Transfer and Migrate Customization
- Customize User Interface (CUI) Editor FAQs
- DIESEL
- Slides and 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
- Migrate and Transfer Custom Settings and Files
- Index
Quick Reference
Commands
DELAY
Provides a timed pause within a script.
GRAPHSCR
Switches from the text window to the drawing area.
RESUME
Continues an interrupted script.
RSCRIPT
Repeats a script file.
SCRIPT
Executes a sequence of commands from a script file.
TEXTSCR
Opens the text window.
VSLIDE
Displays an image slide file in the current viewport.
Run Scripts at Startup
A script that runs at startup can open a drawing and change its settings.
Suppose that every time you begin a new drawing, you turn on the grid, set
the global linetype scale to 3.0, and set layer 0 as your current layer, with red
as the color. You can do this using a drawing template, but you could do it
instead with the following script and store it in a text file called setup.scr.
grid on
ltscale 3.0
layer set 0 color red 0
The first line turns on the grid. The second line sets the global scale for
linetypes. The third line sets the current layer to layer 0 and sets its default
color to red. AutoCAD assumes that in a script you want to use the version of
LAYER command that displays command prompts rather than the palette
version. The result is equivalent to entering -layer at the command prompt.
The fourth line is blank, ending LAYER.
418 | Chapter 6 Slides and Command Scripts