-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Command Scripts
-
-
-
-
Command Scripts
Command scripts are convenient for often performance of certain sequence of actions. Command script is a text file with .scr extension, which contains a set of instructions intended to be executed in nanoCAD command line. Each line of the file contains a command or reference to another script.
There are following commands to work with scripts:
· SCRIPT – loads the script file and consistently performs instructions described in this file. If any script is active at the moment the SCRIPT command is invoked, the script is stopped;
SCRIPTCALL – similar to SCRIPT command that additionally admits nested scripts;
· RESUME – continues an interrupted script;
· RSCRIPT – repeats the last script.
Script files can be created outside the program with help of any text editor. The launched command is written with a new line of the file with parameters values requested by it, positioned through space. Each space in a script is significant, it is similar to pressing ENTER or SPACE.
In case it is necessary to work with command which, when being performed, displays dialog box, use its version without dialog with a hyphen before the command name. For example, you can use -DIMSTYLE instead of DIMSTYLE command.
Scripts can contain comments. Any line that begins with a semicolon (;) is considered a comment, it is ignored while the script is being processed.
The last line of the script must be blank.
Names of files and named objects (layers, styles) that contain spaces must be enclosed in double quotes.
You can run a script at nanoCAD startup from the operating system’s command line using –s switch.