Saturday, August 25, 2007

AutoCAD : Scripts

Creating and running AutoCAD scripts:

-You have to make windows recognize an Autocad script file, because by default windows interpret scr files as screen savers by default.

At windows explorer, go Tools/Folder Options/File Types/New/scr/Advance/AutoCAD Script.

-It is preferred to use Notepad on Windows instead of word processors like Microsoft Word to avoid embedded hidden codes.

-Be careful of multiple spaces between words. Spaces in a script has the same effect as the Enter Key and of creating a new line

-Save the text file with a “.scr” extension.

-Scripts can be run on AutoCad by using SCRIPT or SCR command, or Tools/Run Script on the Menu.

-When debugging or figuring out the script,it is best to set the file dialog box FILEDIA to 0.

Notes:

  1. Hit Backspace Key to pause script in progress
  2. Type Resume at Keyboard to resume paused script
  3. ; Indicates Remarks on the script
  4. A space between text is the same as pressing enter on the script
  5. RSCRIPT Repeats the entire script when placed on the script file
  6. DELAY delays the next line on the script at specified time
  7. Scripts can load and run AutoLISP programs
  8. Scripts can run other scripts with SCRIPT command
  9. Save~ save with a tilde will open the file-management dialog box

No comments: