Extracting data from ACAD into Excel
Extracting data from ACAD into Excel
(OP)
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
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





RE: Extracting data from ACAD into Excel
http://mechcad-insider.blogspot.com/
"The fear of the Lord is the beginning of wisdom"
RE: Extracting data from ACAD into Excel
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
RE: Extracting data from ACAD into Excel
http://mechcad-insider.blogspot.com/
"The fear of the Lord is the beginning of wisdom"
RE: Extracting data from ACAD into Excel
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
RE: Extracting data from ACAD into Excel
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