03.01.2013 Views

Customization Guide (.pdf) - Documentation & Online Help - Autodesk

Customization Guide (.pdf) - Documentation & Online Help - Autodesk

Customization Guide (.pdf) - Documentation & Online Help - Autodesk

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

'DELAY Provides a timed pause within a script (in milliseconds)<br />

'GRAPHSCR Switches from the text window to the drawing area<br />

RESUME Continues an interrupted script<br />

RSCRIPT Repeats a script file<br />

'TEXTSCR Switches to the text window<br />

When command input comes from a script, it is assumed that the settings of<br />

the PICKADD and PICKAUTO system variables are 1 and 0, respectively;<br />

therefore, you do not have to check the settings of these variables.<br />

A script is treated as a group, a unit of commands, reversible by a single U<br />

command. However, each command in the script causes an entry in the undo<br />

log, which can slow script processing. If you like, you can use UNDO Control<br />

None to turn off the undo feature before running the script, or you can write<br />

it at the beginning of the script itself. Remember to turn it back on (UNDO<br />

Control All) when the script is finished.<br />

The script that is running stops when another script command is invoked.<br />

To create a script that changes settings in a drawing<br />

This script turns on the grid, sets the global linetype scale to 3.0, and sets layer<br />

0 as the current layer with red as the color.<br />

1 In a text editor, enter grid on.<br />

2 On the next line, enter ltscale 3.0.<br />

3 On the next line, enter layer set 0 color red 0.<br />

4 Add a blank line.<br />

5 Save the file as ASCII text (TXT file), with a file extension of .scr.<br />

The script file may contain comments, as follows:<br />

; Turn grid on<br />

grid on<br />

; Set scale for linetypes<br />

ltscale 3.0<br />

; Set current layer and its color<br />

layer set 0 color red 0<br />

; Blank line above to end LAYER command<br />

Overview of Command Scripts | 351

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!