CAD CAM CAE - CADinfo.net - home

 microsites>> SmartDraw - CAD results without CAD hassles  

CAD, CAM, CAE, design, technical drawing, drafting, delineation, visualization, manufacturing ISSN 1442-2255 : 5/11/2008 - 7:03:05 AM
 

Recording Scripts

IntelliCAD's script file facility allows you to define a sequence of keystrokes in an external file and then run them on command. Script files eliminate the need to repeatedly enter the same series of keystrokes and ensure that exactly the same keystroke sequence is perfomed each time the script is run.

Scripts are a great productivity aid and because they simply mimic keyboard entry. If you can perform a sequence of commands from the keyboard, you can define it in a script and repeat it exactly any number of times with perfect accuracy. By incorporating LISP, you can even give scripts some intelligence, but that is another story.

Short scripts are easily created just by opening an ASCII text editor (one that does not insert any formatting codes when the file is saved) and typing in the command sequence line by line. Scripts have some (very few) syntax conventions. An "Enter" will be automatically invoked at the end of every line. A ";" character will invoke "Enter" with a line. Save scripts with the .SCR extension.

On the other hand, long scripts are nothing but misery to create by directly typing in the command sequence. Scripts tolerate no error and have no debugging facility.

Fortunately, IntelliCAD includes a built-in script recorder. You only have to turn it on, draw your way through the sequence you wish to save and turn it off. IntelliCAD can then save that sequence to a SCR file and you can load and run it anytime you like. You can also edit it manually if you want to tweak it a little. At least the bulk of the command sequence can be quickly and accurately saved to file.

Recording a Script

  • In IntelliCAD 98, select Tools > Record Script
  • In the File Name box, enter your choice of name for your script file and click Save. From this point on, IntelliCAD is recording all your keystrokes and screen picks.
  • To stop recording select Tools > Stop Recording. The sequence (excluding this last selection) is  saved to the a SCR file in the IntelliCAD 98 folder.

Command line entries are recorded verbatim. menu and toolbar selections are recorded as the commands behind these controls. Screen picks in the drawing editor are recorded as 2D coordinate points. There are some "script-specific" commands that can only be invoked from within a script file or which only apply is a script is running.

Command

Explanation

DELAY x Pauses script execution for the number of seconds (to a maximum of 32,767) designated by x
RESUME Pressing Ctrl-C or Backspace on the keyboard interrupts as script at the end of the command in progress. To pick up the script where you stopped it use RESUME. If a script error has caused the script to cease within a command you can use the transparent version 'RESUME
GRAPHSCR and TEXTSCR Changes focus to the graphic window or text window respectively. Can also be used transparently with leading apostrophe.
RSCRIPT Repeat script restarts the same script again from the start.

Running Scripts

  • Do one of the following...
    • Choose Tools > Run Script
    • On the Tools toolbar, click the Record Script tool
    • Type script and press Enter
  • In the Run Script dialog box enter the name of the script you want to run and click Open. The script begins immediately.

Appending Scripts

You can also append a script you have already created. This is easily done using two instances of your text editor and a quick cut and paste, but IntelliCAD allows you to do it from within as well.

  • Do one of the following...
    • Choose Tools > Record Script
    • On the Tools toolbar, click the Record Script tool
    • Type rescript and press Enter.
  • In the Record Script dialog select the file you wish to append and check the Append To Script box.
  • Click Save.
  • Click Yes to Replace Existing File prompt and the recording process will begin. Refer above to stop recording. The appended file is saved automatically.

 Scripts can be invoked automatically on loading IntelliCAD by double clicking on any script (.SCR) file.

Scripts can be easily shared by users and scripts created with IntelliCAD can be used with AutoCAD, provided only AutoCAD-supported commands are used in the recording sequence.

Please rate our article...
Click on a button to rate this article Click on a button to rate this article

Click to tell a friend about this page...

 

 

Sponsored Links

AnyDWG Offers DWG to PDF, DWG to DXF, PDF to DWG, DWG to JPG, PDF to DXF Converters

AutoDWG offers DWF to DWG, DWG to PDF , PDF to DWG, DWG to Flash Converters, DWG Viewer.

eCampus.com
Get your stuff for College... Cheap!
Textbooks, Greek Gear, DVD's, University Clothing, Computers and MORE!

Access Your PC from Anywhere
Free Trial plus 10% Off!

 

 

Footer
   
All rights reserved © 1996-2007 Digital Business Media Pty Ltd  home : editorial archive : contact : legal