Blog

AutoCAD Script is a simple and great way to run a batch of commands automatically. You can see how Paul uses the script to automate plotting. You can share a script to help your colleague creating the AutoCAD classic interface.

Now, what if you need to run a script on several files automatically? For example, you want to change all object properties to ByLayer with SETBYLAYER command. You want to change properties in a hundred files or so.

You can use ScriptPro to run a script file for multiple files at once, without you need to open the files first. You can download and install ScriptPro from Autodesk website here.

Using ScriptPro

After you install ScriptPro, you can run it from Windows Start Menu> All Programs> Autodesk> ScriptPro. The interface is simple.

  1. The list. You can save and load a list from this panel.
  2. Drawing Files. You can add drawings to the file list from this panel.
  3. Run panel. You can run checked files, selected, or failed files by using the buttons.
  4. Settings button.
  5. The script file that you want to run for files in the list.
  6. The files that will be processed.

After you add the files and select the script file, you can run the script. If AutoCAD is not opened, ScriptPro will open AutoCAD. It will open the file, run the script, then close the file.

If you have multiple flavors or versions on your computer, check it in the settings. Make sure it will use the version that you want to use.

A few things to remember

  1. Test the script first. Make sure it runs well before you use it with ScriptPro.
  2. ScriptPro only runs the script and close the file. It doesn’t save the changes automatically. Add QSAVE at the end of the script to save the changes.
  3. You can use a script to run AutoLISP routine. If you want to run a complex process, this will be very helpful. However, you need to make sure the program is loaded before you run the script. You can load it using Startup Suite.

The example below will run SETBYLAYER command for all objects and save the file.

SETBYLAYER
ALL

YES
YES
QSAVE

If you are not familiar with the script, you can learn how to create it by reading Learn how to write command scripts for AutoCAD and automate your plotting.