Quick Reference
CommandsDELAYProvides a timed pause within a script.GRAPHSCRSwitches from the text window to the drawing area.RESUMEContinues an interrupted script.RSCRIPTRepeats a script file.SCRIPTExecutes a sequence of commands from a script file.TEXTSCROpens the text window.VSLIDEDisplays 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 0The 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