Grenco Posted October 1, 2010 Share Posted October 1, 2010 Hi there! I'm trying to automate the data extraction command/wizzard. My goal is to extract all my revision blocks on my drawing so I can make a drawing(sent-)list. That's no problem, but I don't want to run through the whole wizzard everytime. And I also don't want to set the correct folders. My problems are: How can I load a template .dxe file and edit his loaded drawingfolder? With every different project, a different .dxe file. Every project has it's own drawings. But the path where it is, is refoundable with vba or something (thisdrawing.path & "\dxe-folder\XXX.dxe"). The loaded drawing folder is easy as thisdrawing.path. Different output: with every different project, there is a different excel file to be created. This is not the toughest problem I think because if you run the -DATAEXTRACTION command you can enter the path easily. The data extraction function is not in VBA so I only can use it with a "thisdrawing.sendcommand" I've searched, saw that other people also wanted it but every topic didn't have a solution or went dead. Someone has an idea or solution how to make a makro of it? Quote Link to comment Share on other sites More sharing options...
Grenco Posted October 5, 2010 Author Share Posted October 5, 2010 No one? Quote Link to comment Share on other sites More sharing options...
Grenco Posted July 20, 2011 Author Share Posted July 20, 2011 Bounce.... (A) Quote Link to comment Share on other sites More sharing options...
Sittingbull Posted July 20, 2011 Share Posted July 20, 2011 Hi there, Is it important for you to generate that Data Extraction file? You could simply create an excel file and link it to a table in your titleblock? Regards, SB Quote Link to comment Share on other sites More sharing options...
aggie_moose Posted June 18, 2014 Share Posted June 18, 2014 (edited) I know this is an old thread, but just in case anyone finds this.... With regards to wanting the output to be different each time, I have accomplished this using the following steps: 1. use dataextraction to output to a constant file 2. open a macro-enabled workbook in excel 3. write the location of the currently open file to that workbook 4. use the workbook to execute a macro upon opening 5. use the macro to move the dataextraction to the same directory as the file 6. close excel here's the autolisp code: (command "-DATAEXTRACTION" "C:\\Data Extraction.dxe" "Y") (vl-file-copy "[url="file://\\temporary-extract.xls"]C:\\temporary-extract.xls[/url]" (strcat (vla-get-path (vla-get-activedocument (vlax-get-acad-object))) "[url="file://\\data"]\\data[/url] extraction report.xls")) (OpenExcel "[url="file://\\data_extraction_macro.xlsm"]C:\\data_extraction_macro.xlsm[/url]" "main" vlax-true) (PutCell "A1" (strcat (vla-get-path (vla-get-activedocument (vlax-get-acad-object))) "[url="file://\\data"]\\data[/url] extraction report.xls")) hopefully this helps anyone looking for an answer to this issue Edited June 19, 2014 by SLW210 Added Code Tags Quote Link to comment Share on other sites More sharing options...
SLW210 Posted June 19, 2014 Share Posted June 19, 2014 Please read the Code Posting Guidelines and in the future use Code Tags for your Code. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.