I wish to create a standalone VB.net application which will allow a user to enter a AutoCAD Electrical 2011 drawing name and the VB.Net application then exports the BOM for that drawing to an Excel file.
At present the manual process is: the user opens a drawing, selects 'Reports' and then exports the BOM to Excel from there. I would like to automate this as there are 100's of drawings. I may also need to alter the BOM fields/data that are being exported to Excel.
I am a VB.Net developer but my knowledge of AutoCAD and the AutoCAD APIs is not very good. I have looked a little at ObjectARX and the AutoCAD .net api but frankly, I'm lost as to what approach I should be taking. From the samples I have looked at, it seems I need to have an 'active document' which seems to suggest Autocad needs to be running?
I would be very grateful if anyone can help in any way.
Check with Jerry Winters at VBcad.com. He can answer your questions and also, check out the Autodesk .NET forum.
Scott
Hi.
I just wonder...
Are the 100's of drawings residing in ONE AutoCAD Electrical Project? Because then AutoCAD Electrical's report function will create a BOM for all these 100's of drawings in one operation.
THL
Thanks for your replies. Unfortunately, I really need to
do this using VB.net or VB and from an exteral
application, as I need to provide additional functionality which I haven't
mentioned here.
From the responses I have been getting, it seems this
can't be done for AutoCAD Electrical ?
Well, this is perfectly doable with VB.NET, if you have AutoCAD Available on the computer where you'll run the extraction.
Just open the drawing, scan for inserted blocks and search for the CAT/MFG/ASSY attributes. With this information and access to the DEFAULT_CAT.MDB (Or other databases you must use).
I'm not sure, right now, where Multiple Catalog is stored. You might need to look for some xdata in the inserted blocks as well.
THL
yes, AutoCAD Electrical will be on the computer. Could you give a simple VB.NET code example of how to open the drawing and scan the inserted blocks or is there an API help file I can reference? thanks.
I would just recomend you to to check the AutoCAD -> .NET forums. Loads of people there, able to give you a quick example on how to do this.
THL