AutoCAD Data Extract

AutoCAD Data Extract

barry_fletcher
Participant Participant
2,826 Views
4 Replies
Message 1 of 5

AutoCAD Data Extract

barry_fletcher
Participant
Participant

Apologies - I have seen some replies on this on here but I'm still having issues.

 

In my test, I have 3 .dwg files in a folder called c:\extract

 

All I need to do is to open each file, do an data extract of basic block attributes to a .csv file but it keeps falling down for me.

 

I would appreciate any help and apologies for the basic question.

0 Likes
Accepted solutions (1)
2,827 Views
4 Replies
Replies (4)
Message 2 of 5

Valentin_CAD
Mentor
Mentor

@barry_fletcher ,

 

You may need to provide more information on your meaning of "it keeps falling down".

 

Let us know if you are working with AutoCAD LT or Dynamic blocks.

 

 



Select the "Mark as Solution" if my post solves your issue or answers your question.

Seleccione "Marcar como solución" si mi publicación resuelve o responde a su pregunta.


Emilio Valentin

0 Likes
Message 3 of 5

barry_fletcher
Participant
Participant

Apologies - I was rushing when typing. Each example I follow from online searchs stop working at some stage. Would you have a sample .bat and .scr that I can edit the paths on to get this to work. All I am doing is automating a data extract that I am currently performing manually by doing a dx command.

0 Likes
Message 4 of 5

Michiel.Valcke
Advisor
Advisor
Accepted solution

I did some similar things (without data extract) where I needed some help from others, this is the post:
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-fil...

 

I originally based it off an AU class by Michael Best (link in the original post)

basically you do something like this:

set accoreexe="C:\Program Files\Autodesk\AutoCAD 2024\accoreconsole.exe"
set source="C:\YourDirectoryWithDWG's"
set script="C:\YourScript.scr"
FOR /f "delims=" %%f IN ('dir /b "%source%\*.dwg"') DO %accoreexe% /i %source%\%%f /s %script%

I'm not sure the core console is capable of executing a data extraction, it is not 100% the same as the interfaced version of autocad and it's very difficult to find documentation about.

If per chance the name of the dwg's is always the same you can just skip this all and just save all 3 .dwg's in the same dxe file. It is perfectly possible to run data extraction on multiple drawings at once.



Message 5 of 5

CGBenner
Community Manager
Community Manager

@barry_fletcher  Did the information provided answer your question? If so, please use Accept Solution so that others may find this in the future. Thank you very much!

Did you find a post helpful? Then feel free to give likes to these posts!
Did your question get successfully answered? Then just click on the 'Accept solution' button.  Thanks and Enjoy!



Chris Benner

Community Manager - NAMER / D&M


0 Likes