2013
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
To run the same script at startup but create a new drawing using the
MyTemplate.dwt file as the template, enter the following in a Terminal window:
AutoCAD -t MyTemplate -b setup
This command creates a new drawing and issues a sequence of setup commands
from the setup.scr file. When the script has finished running, the command
prompt is displayed.
If you want to use the default template for the new drawing, you can omit
the -t switch and the template file name.
Run Scripts at Startup
To run a script at startup
1 Click local drive Applications Utilities Terminal.
2 In the Terminal window, enter AutoCAD drawing_name -b
script_name.
NOTE AutoCAD listed above is the path to the AutoCAD executable. By
default it is located at:
/Applications/Autodesk/<release>/AutoCAD.app/Contents/MacOS/AutoCAD
To start a new file, instead of a drawing file name, enter the -t switch
and the name of a template file: -t template_drawing.
The name of the script file must be the last parameter listed. The file
extensions are optional.
3 Press Enter.
AutoCAD opens the drawing and executes the commands in the script
file. When the script has been completed, the Command prompt is
displayed.
78 | Chapter 6 Command Scripts