• Home
  • Training Books
  • Subscribe to Our Email Newsletter
  • About
    • Contributors
    • Feedback
    • Contact
    • Privacy policy
    • Cookie Policy
  • Bahasa IndonesiaBahasa Indonesia

CADnotes

CAD Tutorials and Best Practices for professionals and students

  • Featured
  • AutoCAD
    • AutoLISP
  • Revit
    • Revit Architecture Basic
    • Revit MEP Basic Tutorial
  • Inventor
  • MicroStation
    • MicroStation Basic Tutorial
  • CADnotes on YouTube
You are here: Home / AutoCAD / Run a script on multiple DWG with ScriptPro

Run a script on multiple DWG with ScriptPro

April 18, 2017 by Edwin Prakoso 7 Comments

In this Article...

  • Using ScriptPro
  • A few things to remember

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.

About Edwin Prakoso

I work as a Solution Consultant in Datech Solutions, Tech Data Indonesia. I've been using AutoCAD since R14 and Revit since Revit Building 9. I occasionally write for AUGIWorld magazine and I am also active in Autodesk discussion forum. I'm a member of Autodesk Expert Elite, an appreciation for individuals who give contributions to the Autodesk community.
Connect with me on twitter or LinkedIn. If you want to have my new articles sent to your email inbox, you can subscribe to the newsletter.

Filed Under: AutoCAD Tagged With: AutoCAD script, ScriptPro

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

7 Comments
Inline Feedbacks
View all comments
Ericka
Ericka
1 year ago

Everything is processing the way it should but my scripts are not saving & I have qsave at the end. I don’t know if I’m using the program wrong or what. Trying to see where the problem is. Any help would be appreciated. Thanks

2
Reply
David Nguyễn
David Nguyễn
2 years ago

I’m using DraftSight. Can I use ScriptPro to run a script file for multiple files  ?

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  David Nguyễn
2 years ago

Hi David,
I’ve never used DraftSight.I apologize if I can’t confirm this.

0
Reply
Garry Nelson
Garry Nelson
6 years ago

Edwin:
You almost got to the ripest fruit… in addition to `If you have multiple flavors…’ it should be mentioned that you can also use your version(s) associated accoreconsole.exe as a `version’. The AutoCAD core console opens in a `non-graphical’ window, similar to the command prompt. There are several `graphical’ operations that you can’t do with the accoreconsole, but plotting isn’t one of them. We often batch plot several hundred drawings at a time. The accoreconsole doesn’t `re-draw’ each file it processes – it merely plots from the drawing database without displaying it on the screen. So it’s fast. Ultra-fast. A script to plot by opening each of 100 drawings takes hours… but the same script used to plot using accoreconsole.exe takes minutes. Accoreconsole.exe has been right next to your acad.exe for years.

1
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Garry Nelson
6 years ago

Thank you very much, Garry!
That’s a very helpful information. I will take a look and write something about it. Or do you want to write an article for CADnotes?

0
Reply
Gennaro Palmieri
Gennaro Palmieri
6 years ago

HI Edwin
just read your article on “Run a script on multiple DWG with ScriptPro”. We are not allowed to install programs at my work. Is there a portable version available?

Thanks
Gennaro Palmieri

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Gennaro Palmieri
6 years ago

Gennaro,
Unfortunately there’s no portable version of ScriptPro. At least not that I’m aware of.

0
Reply
wpdiscuz   wpDiscuz
Join Our Free Email Newsletter
  Thank you for Signing Up
Please correct the marked field(s) below.
1,true,6,Contact Email,2 1,false,1,First Name,2 1,false,1,Last Name,2

Featured

10 Reasons to Use AutoCAD Layout

AutoCAD layout brings many benefits. It simplify, represent, manage and automate your drawings. See 10 reasons why you should use it here.

Recent Articles

  • Revit 2024.1 Update is Released
  • What’s New in Revit 2024: Bending Detail
  • What’s New in Revit 2024: The Dark Theme

Advertisement

New on CADnotes

  • Revit 2024.1 Update is Released
  • What’s New in Revit 2024: Bending Detail
  • What’s New in Revit 2024: The Dark Theme
  • Autodesk Build: Using Assets for Progress Tracking
  • My Home on the ACC Unified Platform

Meet the Authors

avatar for
avatar for
avatar for
avatar for
avatar for
avatar for

Get Connected

CADnotes on FacebookCADnotes on InstagramCADnotes on TwitterCADnotes on YouTube

© 2009 – 2023 CADnotes · Feedback · Privacy Policy · Become an affiliate

wpDiscuz