To create a script that changes settings in a drawing (Procedure)

AutoCAD

 
Overview of Command Scripts
Concept Procedure Quick Reference
 
 
 

This script turns on the grid, sets the global linetype scale to 3.0, and sets layer 0 as the current layer with red as the color.

To create a script that changes settings in a drawing

  1. In a text editor, enter grid on.
  2. On the next line, enter ltscale 3.0.
  3. On the next line, enter layer set 0 color red 0.
  4. Add a blank line.
  5. Save the file as ASCII text (TXT file), with a file extension of .scr.

    The script file may contain comments, as follows:

; Turn grid on
grid on
; Set scale for linetypes
ltscale 3.0
; Set current layer and its color
layer set 0 color red 0
; Blank line above to end LAYER command