BackToCAD Technologies LLC |  Artificial Intelligence and Software Developing  |  Clearwater, USA; Stuttgart, Germany |  Kazmierczak®  Company

Creating and replaying scripts

 

CADdirect 2022 can record anything you type on the keyboard and any points you select in a drawing. You can save all of these actions to a script file (with the *.scr extension) and then repeat them by replaying the script. You can use scripts for successively repeating commands, showing snapshots in a slide show, or batch printing. You can also load and run script files created for use with AutoCAD.

 

Understanding scripts

 

CADdirect 2022 supports most AutoCAD customization files, including menus, script files, and LISP routines. CADdirect 2022 uses compatible linetypes, hatch patterns, units translation, and command aliases, but you can also substitute your own files for these. This feature allows you to continue to work with your favorite customized drafting environment.

 

A script is a form of text file. A script file contains one line of text or other data for each action. For example, when you type a command and press Enter, it is recorded on a line in the script file. When you select a point in a drawing, the coordinate of that point is recorded on a line in the script file. You can also create script files outside CADdirect 2022 using a text editor (such as Microsoft® Notepad or Microsoft® WordPad) or a word-processing program (such as Microsoft® Word) that saves the file in ASCII format. The file type and extension must be .scr.

 

Script files can contain comments. Any line that begins with a semicolon is considered a comment. The program ignores these lines when replaying the script. The Undo feature reverses the last command performed by the script.

 

CADdirect 2022 improves on scripts, AutoLISP, and ADS by providing additional functions. For scripts, CADdirect 2022 includes a Script Recorder that records both command line entries and screen picks you make with your mouse.

 

Recording scripts

 

After you activate the Script Recorder, every keyboard entry you make and any points you select in a drawing are recorded until you stop the Script Recorder. You can play back your script at any time.

 

CAUTION:

 

The Script Recorder does not record your use of toolbars, menus, or dialog boxes. Using these elements while recording a script causes unpredictable results.

 

To record a script

 

Do one of the following to choose Record Script:

 

  • On the ribbon, choose Tools > Record Script (in Applications).
  • On the menu, choose Tools > Record Actions > Record Script.
  • On the Tools toolbar, click the Record Script tool.
  • Type recscript and then press Enter.

 

Specify the name of the script file you want to create.

 

Click Save.

 

Type commands on the keyboard.

 

The Script Recorder records all keyboard entries and all points you select in the drawing, saving everything to the script file.

 

To stop recording

 

Do one of the following to choose Stop Recording:

 

  • On the ribbon, choose Tools > Stop Recording (in Applications).
  • On the menu, choose Tools > Record Actions > Stop Recording.
  • On the Tools toolbar, click the Stop Recording tool.
  • Type stopscript and then press Enter.

 

Replaying scripts

 

To replay a script

 

Do one of the following to choose:

 

  • On the ribbon, choose Tools > Run Script (in Applications).
  • On the menu, choose Tools > Record Actions > Run Script.
  • On the Tools toolbar, click the Run Script tool.
  • Type script and then press Enter.

 

In the Run Script dialog box, specify the name of the script file you want to run.

 

Click Open.

 

The program immediately runs the script, performing all the actions originally recorded.

 

Double-click a script file.

 

To invoke a script automatically when you load CADdirect 2022, in Windows Explorer, double-click a script file.

 

Modifying scripts

 

To append to a script

 

Do one of the following to choose Record Script:ications).

 

  • On the menu, choose Tools > Record Actions > Record Script.
  • On the Tools toolbar, click the Record Script tool.
  • Type rescript and then press Enter.

 

In the Record Script dialog box, select the Append To Script check box.

 

Select the existing script file to append.

 

Click Save.

 

Click Yes to the prompt asking whether you want to replace the existing script.

 

Repeat the procedure to enter additional commands and steps.

© Copyright 2021 BackToCAD Technolgies LLC . All rights reserved. Kazmierczak® is a registered trademark of Kazmierczak Software GmbH. CADdirect 2022 is a trademark of Expert Robotics Inc. Print2CAD and CAD2Print are Trademarks of BackToCAD Technologies LLC. DWG is the name of Autodesk’s proprietary file format and technology used in AutoCAD® software and related products. Autodesk, the Autodesk logo, AutoCAD, DWG are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and/or other countries. All other brand names, product names, or trademarks belong to their respective holders. This website is independent of Autodesk, Inc., and is not authorized by, endorsed by, sponsored by, affiliated with, or otherwise approved by Autodesk, Inc. The material and software have been placed on this Internet site under the authority of the copyright owner for the sole purpose of viewing of the materials by users of this site. Users, press, or journalists are not authorized to reproduce any of the materials in any form or by any means, electronic or mechanical, including data storage and retrieval systems, recording, printing or photocopying.