Commands that control AutoCAD scripts
Hi Everyone,
I hope you are all having an idea of what scriptys are and must have created some scripts.
For the friends who have just joined the series here are the links for previous posts :
Part - 1 Part - 2
Today, We shall discuss command that control the AutoCAD scripts.
Actually, there are a only a few commands that relate specifically to scripts. In fact, these commands are of absolutely no use for any other purpose.
Script.
The Script command (1) loads a script file; and (2) immediately begins running it. Use it like this:
Command: script
Enter script file name <C:\Users\Abhay_2\Documents\Drawing1.scr>:Filename
Remember to turn off (set to 0) the FileDia system variable, so that the prompts appear at the command line, instead of the dialog box.
RScript.
This is short for "repeat script," this command re-runs whatever script is currently loaded in AutoCAD. A great way to creating an infinite loop. There are no options:
This command resumes a paused script file. I pause a script file by pressing the Backspace key. Again, no options:
This command is used to create a pause in a script file. Delay command should be used along with a number.
The number specifies the pause in milliseconds, where 1,000 milliseconds equal one second. The minimum delay is 1 millisecond; the maximum is 32767 milliseconds, which is just under 33 seconds. While I could use Delay at the 'Command:' prompt, that makes little sense; instead, Delay is used in a script file to wait while a slide file is displayed or to slow down the script file enough for humans to watch the process, like this:
For this reason, it is better to place one script item per line, like this:
; (semi-colon).
To insert comments in a script file. AutoCAD ignores anything following the semi-colon.
' (apostrophe).
Scripts can be run transparently during a command. For Example, simply prefix the Script command to run a script while another command is active, like this:
* (asterisk).
There is one special case where the asterisk gets used. When I prefix the VSlide command with the *, AutoCAD "pre-loads" it to provide faster slide viewing performance:
is the key I already mentioned for pausing a script file.
Esc
stops a script file dead in its tracks; use the RScript command to start it up again from the beginning
I hope you are all having an idea of what scriptys are and must have created some scripts.
For the friends who have just joined the series here are the links for previous posts :
Part - 1 Part - 2
Today, We shall discuss command that control the AutoCAD scripts.
Actually, there are a only a few commands that relate specifically to scripts. In fact, these commands are of absolutely no use for any other purpose.
Script.
The Script command (1) loads a script file; and (2) immediately begins running it. Use it like this:
Command: script
Enter script file name <C:\Users\Abhay_2\Documents\Drawing1.scr>:Filename
Remember to turn off (set to 0) the FileDia system variable, so that the prompts appear at the command line, instead of the dialog box.
RScript.
This is short for "repeat script," this command re-runs whatever script is currently loaded in AutoCAD. A great way to creating an infinite loop. There are no options:
- Command: rscript
This command resumes a paused script file. I pause a script file by pressing the Backspace key. Again, no options:
- Command: resume
This command is used to create a pause in a script file. Delay command should be used along with a number.
The number specifies the pause in milliseconds, where 1,000 milliseconds equal one second. The minimum delay is 1 millisecond; the maximum is 32767 milliseconds, which is just under 33 seconds. While I could use Delay at the 'Command:' prompt, that makes little sense; instead, Delay is used in a script file to wait while a slide file is displayed or to slow down the script file enough for humans to watch the process, like this:
- ; Pause script for ten seconds:
delay 10000
How many spaces are there between 'attedit' and the coordinates '1,2'? I'll wait while you count them ...; Edit the attributes one at a time: attedit 1,2
For this reason, it is better to place one script item per line, like this:
- ; Edit the attributes one at a time:
attedit
1,2
; (semi-colon).
To insert comments in a script file. AutoCAD ignores anything following the semi-colon.
' (apostrophe).
Scripts can be run transparently during a command. For Example, simply prefix the Script command to run a script while another command is active, like this:
- Command: line
Specify first point: 'script
>>Script file: filename
* (asterisk).
There is one special case where the asterisk gets used. When I prefix the VSlide command with the *, AutoCAD "pre-loads" it to provide faster slide viewing performance:
- *vslide
is the key I already mentioned for pausing a script file.
Esc
stops a script file dead in its tracks; use the RScript command to start it up again from the beginning
No comments:
Post a Comment