Macros from the past: Part 1 (AutoCAD Batch Mode)

I was doing some early spring cleaning on my backup drive and found some old remnants of past AutoCAD and Inventor macros that I thought would be cool to share. I’m going to share these one per blog post. None of these are really functional anymore and some only exist as saved screenshots  but it’s neat to see what’s possible with some good ole’ fashion, down and dirty coding.

The first is a Batch Mode Operations tool for AutoCAD. This macro was used to batch process an entire folder of drawings by updating the drawing number and renaming the file. It also could update some title block attributes. This tool was used to copy an entire projects design from one plant location to be used in another plant location. Since the designs had the tendency to diverge once the equipment was installed, the drawings needed to be separate
and unique. It would have consumed a  few weeks of someone’s time to copy out the files, rename them and update the title block values. This batch tool could accomplish the same task within a few minutes.

The other function of the macro was to batch extract title block attributes to an Access database. The macro would create a database in the selected folder if one did not exist already. The macro allowed you to add the attributes from the files or update the values if the filename already existed in the database. You could also remove entries based on the current batch. This allowed you to keep your drawing properties synched to the database. I was in the process of adding the functionality to feed the database properties back to the drawings when the project was shelved.

Here’s what the exported database would look like:

This entire tool was completely designed in VBA (Visual Basic for Applications) for AutoCAD (circa 2001 or so). Next set of posts, I’ll show you some more cool tools you develop using VBA. I’m so glad I save everything. Now I just wish I would have saved the actual macros.

VN:F [1.9.22_1171]
Rating: 4.3/5 (4 votes cast)
Macros from the past: Part 1 (AutoCAD Batch Mode), 4.3 out of 5 based on 4 ratings

Permanent link to this article: http://cadtoolbox.com/2011/02/24/macros/

2 comments

2 pings

    • David Swaty on April 14, 2011 at 11:11 AM
    • Reply

    This is just perfect thank y ou so much!!!

    David Swa ty

    VA:F [1.9.22_1171]
    Rating: 0.0/3 (0 votes cast)
    • David Swaty on April 14, 2011 at 11:13 AM
    • Reply

    Thank you so much you have saved me some hours of work
    David Swaty
    CADD/ECM Consultant
    Boardwalk Pipeline Partners, LP

    VA:F [1.9.22_1171]
    Rating: 0.0/3 (0 votes cast)
  1. […] This post was mentioned on Twitter by Paul, Thomas Rambach. Thomas Rambach said: New Blog Post: “Macros from the past: Part 1 (AutoCAD Batch Mode)” – http://bit.ly/etDma6 […]

  2. […] some good ole’ fashion, down and dirty coding. You can read the 1st part of this blog post series here, and 2nd part of this blog post […]

Leave a Reply

Your email address will not be published.

* Copy This Password *

* Type Or Paste Password Here *

15,964 Spam Comments Blocked so far by Spam Free Wordpress