Untitled

(Steven Felgate) #1

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.

gridon
ltscale3.0
layerset 0 colorred 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 LT assumes that in a script you want to use the version
of LAYER command that displays command prompts rather than the dialog
box version. The result is equivalent to entering -layer at the command prompt.
The fourth line is blank, ending LAYER.

352 | Chapter 6 Slides and Command Scripts

Free download pdf