Home > Support >  > Article

Script Recorder in ZWCAD

Have you ever used scripts in AutoCAD? Are you aware of the Script Recorder in ZWCAD? If you have tried writing scripts for AutoCAD, then you will appreciate the automated nature of ZWCAD's script recorder tool.

To see how useful scripts can be, we'll compare them to using blocks to create complex drawings quickly. Both significantly reduce the time it takes to perform repeated drafting of similar objects.

Just as you create and insert blocks, you can record and replay scripts to automate processes. The Script Recorder in ZWCAD records every command typed, option chosen, and coordinate entered. Keep in mind that writing scripts and inserting blocks have the same limitations:

(1) Blocks need to be created first; so do scripts. By using the Script Recorder, your drafting operations are recorded in an SCR file, which is then used to redraw the entities automatically.

(2) To insert blocks, you use the INSERT command. To draw automatically with scripts, you use the SCRIPT command. In both cases, executing a single command draws complicated shapes at one time.

While you cannot specify different insertion points during scripts, you can edit the graphics afterwards directly -- unlike blocks, the modification of which requires special commands for in-place editing or exploding.

Of course, you could instead write a program using LISP. But if you are not prepared to learn to write computer programs with LISP, using scripts is probably much easier initially. Just draw as you wish, ZWCAD Script Recorder follows your operations and records an executable script file.

If you are familiar with LISP programming, then the Script Recorder can help you out. Instead of sketching on paper and then writing the program in LISP line by line, you can let the Script Recorder document each drawing and editing command and their sometimes complicated options. It can become tiring to write down and arrange long series of commands and parameters; the more complicated the graphics, the longer the LISP programming takes. With ZWCAD's Script Recorder, you can simply draw directly with the keyboard and mouse: your operations appear as a script file.

LISP has some differences from script, but the expressions in the script become a good reference for a corresponding LISP program that does the same job. Such a reference significantly reduces the difficulty of programming.

Like a digital recorder that records sounds, the Script Recorder in ZWCAD records your every drafting operation, from keystrokes to mouse clicks. Recorded scripts can be either used directly for automated drafting or taken as a reference for LISP programming. Compact and useful, hopefully ZWCAD's script recorder will become one of your efficient drafting assistants.

(PS: Do remember to turn off the DYN toggle before using Script Recorder in ZWCAD.)