Automatic dataextraction

Automatic dataextraction

Anonymous
Not applicable
1,358 Views
2 Replies
Message 1 of 3

Automatic dataextraction

Anonymous
Not applicable

Hi!

 

I am trying to create a small VBA code (from excel) that allows me to do a new dataextraction everytime, and create an Excel file (not necessary to be linked with the drawing, i just want the file extracted). 

Lets picture the situation:

 

I have 100 drawings that contains the information more or less in the same shape. I want to run my code once for each drawing. 

I have found a solution to an extent:

Sub dataextraction()
AutoCAD.Application.ActiveDocument.SendCommand ("-dataextraction" & vbCr & "C:\Users\alvar\OneDrive\Documentos\pruebaDirectos1.dxe" & vbCr & vbCr)

End Sub

 

It works, but it creates an excel file with the data of the drawing which the .dxe file comes from.

What i really want is to do an extraction from scratch, but with an specific shape previously set.

Is it possible somehow? it would be very useful because i could skip the dataextraction wizard every time i do the extraction, since i have a great deal of documents.

 

Thank you very much

Regards

0 Likes
1,359 Views
2 Replies
Replies (2)
Message 2 of 3

maratovich
Advisor
Advisor

What is your ultimate goal?

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 3 of 3

Anonymous
Not applicable

im requested to do several extractions of a great deal of drawings, creating an external Excel File.

Imagine if i do manually:

I will open the dataextraction wizard, i will set everything as i want (filters of objects type, the order of the colmuns of the data in Excel and so on). 

What i want is to create a code to call this command and extract everything that is in this drawing in an excel file with the shape that i have set before. also i want to keep the filters , because i just want a part of all the data (for example i just want texts, its cordinates, its content and not so many more info).

 

I hope that i clarified the issue!

 

Regards and thanks for your answers.

0 Likes