Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting data from ACAD into Excel

Status
Not open for further replies.

LarryEF

Mechanical
Apr 4, 2007
19
US
Hi There,

I have several hundred drawings (paths and file names)listed in an Excel spreadsheet. I need a program to open each dwg, determine if specific layers and text styles are in that drawing, and if so, if they are being used. Then I need the results added to columns in the Excel spreadsheet beside the file name so I can total how many (and which) files include the layers / text styles and how many (and which) files use them.

I've seen a script file that goes through a list of drawing file names, opens each drawing, changes properties, saves, closes, and then opens the next drawing. However, I do not know where to find out how to use code to determine the existance of the layers and text styles, determine if they are used, and extract the data into Excel.

The books I've consulted indicate that this is possible, but they don't say how to do it.

Any help or direction would be appreciated.

Thanks,
Larry
 
Replies continue below

Recommended for you

I've written a lot in Basic in the 80's, and a fair amount in early VB. I have a book and access to VB 6. I haven't used VBA with AutoCAD.

Let's give it a shot and if I get lost I'll find someone to help me with the VB part of it.

Thanks,

Larry
 
Once you have the application objects of Excel and Autocad, pushing and pulling information is fairly easy. Post back as you need assistance. I know that the users here are glad to help.



"The fear of the Lord is the beginning of wisdom"
 
Hi Larry,

You may find it a bit easier just to use AutoCAD's VBA. There is already a sample program of sending information to Excel via AutoCAD VBA and may be able to just modify it to do what you need. You'll find it in the sample directory.

HTH
Todd
 
Borgunit,

I guess we need to assume I'm a total idiot. Do you know good books that I can use to get a background so I can ask intelligent questions and understand simple answers? I'm using AutoCAD 2007 Bible by Ellen Finkelstein. Other than the script file I mentioned, her examples of AutoLisp and VBA refer to automatically drawing circles, etc. That will allow me to work out syntax, etc., but doesn't touch on what I need to do.

Thanks,
Larry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top