I have created a visual basic program in microsoft Excel using ObjectDbx that will currently do the following:
- Generate a list of AutoCAD dwgs in the current directory (where excel file is saved) and display the list in Excel
- Search the drawings in the list for a specified block and display the attributes of the block in Excel
- You can then change the attributes shown in Excel and send them back to the listed AutoCAD dwgs
- Search the drawings in the list and display all external references in Excel
This program works fine with the following exceptions:
Issue #1: When attributes are updated with this program, they will appear left justified until the block is refreshed (known issue)
Issue #2: The program will only find a single instance of the specified block in each drawing. This issue occurs if you have multiple Paperspace tabs with the specified block inserted in each tab.
QUESTIONS:
Has anyone out there been able to resolve Issue #2 using ObjectDbx?
or
Will I need to go through the AutoCAD interface and generate selection sets somehow?
ATTACHMENT:
I attached my Excel file to this posting for reference. It is a very useful tool given the above issues. I am sure that it could have been a little cleaner but at least I have some commenting. Feel free to post questions or comments regarding the program and I will do my best to answer them.
Notes:
- In Excel VBA, need to reference: Microsoft Scripting Runtime, AutoCAD 2008 type Library, AutoCAD/ObjectDbx Common 17.0 Type Library
- Compatibility: AutoCAD 2008, Excel 2003+