SCRIPT — Run Script
Runs a command script (.scr).
- Command:
SCRIPT· Global name:_SCRIPT· Alias:SCR - Ribbon: Manage › Applications
- Menu: Tools
Runs a script: a .scr text file whose lines are typed on the command line one after another, as if the user entered them. Use it to repeat tasks (setting up layers, purging, changing variables…) in one or more drawings.
Usage
- Enter SCRIPT (or SCR) or click its button.
- Choose the
.scrfile in the dialog box. (In a script that calls another one, its path is typed.)
Enter script file name:
- The lines run in order. Meanwhile the keyboard does not reach the command line.
How a script is written
- Every space and every end of line counts as pressing Enter, as in AutoCAD:
CIRCLE 0,0 5draws a circle. - When a command expects free text (the text of TEXT, a layer or style name…), the rest of the line is taken whole, with its spaces.
- In other prompts, a value with spaces is written between quotes:
"Exterior wall". - Lines that start with
;are comments. - A blank line is an Enter (it repeats the last command or ends the active one).
; Current layer, linetype scale and purge CLAYER Exterior wall LTSCALE 50 -PURGE A * N
Notes
- Commands with a dialog box are used in their command-line version (-PURGE, -LAYER, -INSERT…).
- AutoCAD's RSCRIPT, DELAY and RESUME are not available yet.