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.