Author Topic: AutoCAD Electrical 2014 extract parts from a drawing with VBA  (Read 3908 times)

0 Members and 1 Guest are viewing this topic.

dcrouch

  • Guest
AutoCAD Electrical 2014 extract parts from a drawing with VBA
« on: August 06, 2015, 10:47:13 AM »
I'd like to know if it is possible to extract a parts list from a dwg file using vba? I'm familiar with creating a bill of materials report using the AutoCAD GUI and I need to create something similar but programmatically for each drawing within a large library of drawings.

So far I have managed to iterate through all the blocks in the ModelSpace but I can only get hold of AcadBlockReferece objects and these only seem to hold information on the symbol name and not the associated parts list.

Any help would be greatly appreciated.

dcrouch

  • Guest
Re: AutoCAD Electrical 2014 extract parts from a drawing with VBA
« Reply #1 on: August 12, 2015, 01:46:27 AM »
In case anyone's interested I've given up on trying to use the vba API. It seems to me that much of the autocad electrical features are simply not available through the vba API.

However, what does look promising is using vba to export to DXF format and then parsing the file to extract what I need. On first glance all the part information appears to be in the file.