data Extraction

data Extraction

Anonymous
Not applicable
1,527 Views
15 Replies
Message 1 of 16

data Extraction

Anonymous
Not applicable

I am trying to find a method for extracting Attirbute information from a drawing.  I can use the Data Extraction Wizard and it works for the most part but It doesn't give me the option of extracting the "Handle" from the Block.  What I would like is something that could extract all Attributes from a Block based on my selection, including the "Handle".  It would be really nice it it would work on multiple files / folders at a time as we have over 2,000 drawings that we need to process.

 

 

 

 

0 Likes
1,528 Views
15 Replies
Replies (15)
Message 2 of 16

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

ExpressTools do have a command called _ATTOUT, that extracts attributes + the handle of the blockreferences.

To make that running through multiple drawings you can use ScriptPro >>click<<<

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 16

Anonymous
Not applicable
Will it allow me to output the data into a spreadsheet and will it allow me to select a folder with hundreds of files in it and then just work.

Sent from my iPhone
0 Likes
Message 4 of 16

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

why not trying it?;)

 

_ATTOUT creates an <TAB>-seperated TXT-file (>>>help content<<<)

And ScriptPro is built for running scripts with multiple drawings, you'll find a lot of (already existing) help about that in www.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 5 of 16

Anonymous
Not applicable

I have tried it. I don't want to extract all the Attibute information, just a limited number of items including the Handle. As well, I want it to go straight into a Database or Excel spreadsheet. I don't have the time to do an export and then have to import into Excel or a Database.


Sincerely,

Michael Quinton
Coordinator, Facilities Technologies,
University of Lethbridge

0 Likes
Message 6 of 16

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> I don't have the time to do an export and then have to import into Excel or a Database.

You have not told anything about Excel in your first post, you didn't mention anything about database up to the last post ... how should we know what you need and so what we can suggest?

 

Describe the complete situation, and let's see what happens then with answers here.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 7 of 16

Anonymous
Not applicable

Point taken.

We manage our rooms here at the university using an Oracle database.

We have over 4,000 drawings of the various buildings and rooms and within each drawing we have blocks with various attributes for each room or area. The attributes are Room Title, Room Location, Area of the room or area. Along with these we have the unique handle associated with each block.

What we are trying to accomplish is have the Drawing linked to a spreadsheet or Access / Oracle database that will allow us to extract the data from the Drawing (Room Title, room Location, Area, Drawing Name, Block Nam, Handle) and store it in the spreadsheet or Database.

I have tried using the Data Extraction wizard and created an output file based on the attributes I chose. This worked well but did not include the "handle" information.

I have also tried the ATTOUT command. It does output the Handle but also includes a number of attibutes that I don't need.

I am looking for a solution that will allow me to select a drawing, specify the attributes that I want to extract, including the Handle, and output it either to an excel spreadsheet or into a database. Because of the sheer number of files that we are dealing with we would like something that is somewhat automated, ie: I don't have to open up each file in Autocad and run the script. I am also looking for something that doesn't require me to do a number of steps like exporting to a text file and then importing to a spreadsheet.


Sincerely,

Michael Quinton
Coordinator, Facilities Technologies,
University of Lethbridge

0 Likes
Message 8 of 16

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> Along with these we have the unique handle associated with each block.

Are you speaking about the AutoCAD created "handle"? If so it can't be unique as there is no guarantee that a handle in one drawing is not used also in one of your other 4000 drawings ... just to be prepared.

 

>> What we are trying to accomplish is have the Drawing linked to a spreadsheet or Access / Oracle database

>> that will allow us to extract the data from the Drawing (Room Title, room Location, Area, Drawing Name,

>> Block Nam, Handle) and store it in the spreadsheet or Database

Sorry that you are so far away, because that type of application which connects drawings and data from databases to build up a Facility Management System is one of our major applications/market.

If you have access to Map3D then you can have direct connections between geometry and database-records (from tables and/or views). So you can open a drawing, open the database connection and then "connect" these two elements together. When you open the drawing next time you can select the room-block and get the database record for that room and vice versa.

 

It is also a question of "one-way" and "one-time" (data from CAD is exported to the database just once, and that's it) or an always active connection (opening the drawing two years later shows you the updated records for that from from the database table/view) ....

 

As you wrote "you don't have the time" ... what you describe is not a 1 minute job. It first depends on how good is the quality of the 4000 drawings (is the structure the same in all drawings and also proofed) and then how often you need this export or which way you go (one-way or live-long-connection). Be prepared that this needs time, but if it's done, you won.

 

At least I would say that you might loose a bit time if you do your customization for that process/workflow, but that makes it more easy then to repeat this whenever you need it. When you look for finished tools then you will have to go multiple steps like first export to TXT, then restructure that TXT, then import that as Oracle table ...

 

HTH ,- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 9 of 16

owen66
Advocate
Advocate

it's going to be custom code to read the dwg file (the actual data structure withing the dwg file). there is no out-of-the-box solution for what you want.

 

at the very least, it's going to require data massaging - probably a combo of ATTOUT, DATAEXTRACTION and then merging with some kind of vlookup...

*********************************************************
"Aah, there's nothing more exciting than science. You get all the fun of sitting still, being quiet, writing down numbers, paying attention...science has it all."
0 Likes
Message 10 of 16

Anonymous
Not applicable

Yes I am referring to the Handle that is created by Autocad when you create a Block. I was led to believe that it was unique.

Sincerely,

Michael Quinton
Coordinator, Facilities Technologies,
University of Lethbridge

0 Likes
Message 11 of 16

Anonymous
Not applicable

It doesn't have to read the DWG file itself, just the Blocks that are stored within it.

Sincerely,

Michael Quinton
Coordinator, Facilities Technologies,
University of Lethbridge

0 Likes
Message 12 of 16

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> I am referring to the Handle that is created by Autocad when you create a Block. I was led to believe that it was unique.

No, every drawing exists only for itself, a handle is something like an ID within the drawing.

And drawing A does not know if a drawing B created on the other side of the world has the same handle already in use or not.

You might use the blocks-attributes to store something like a GUID and create for each room a GUID which you save to the room-block as well as to the database-record, so you can join them together and they are unique then.

You might try to use the handle and make <DrawingName><Handle> together to an ID-value (as long as the <DrawingName> is unique ... but keep in mind that modifying a drawing - e.g. doing cleaning using WBLOCK - will also result in a new handle for the same room-block in the new cleaned drawing. So the handle is not the best part to be used as ID at all.

 

>> It doesn't have to read the DWG file itself, just the Blocks that are stored within it

To get access to the blocks you nead to open the DWG-file, the blocks are not stored outside the file.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 13 of 16

owen66
Advocate
Advocate

"It doesn't have to read the DWG file itself, just the Blocks that are stored within it."

 

it actually necessarily does need to read the DWG file.

*********************************************************
"Aah, there's nothing more exciting than science. You get all the fun of sitting still, being quiet, writing down numbers, paying attention...science has it all."
0 Likes
Message 14 of 16

cadwomen
Collaborator
Collaborator

Hy

 

are you just have plain Autocad ? for this ?

 

20xx ?

 

so for excel may this will help you to check what you have

 

http://www.lee-mac.com/macatt.html

 

cu cw

look for some other things ( dont get ACAD anymore )

If my post answers your question, please mark it as an Accepted Solution, so that others can find answers quickly!
0 Likes
Message 15 of 16

cadwomen
Collaborator
Collaborator

all so may

 

dbConnect

 

will be something you shoud look on

 

cu cw

If my post answers your question, please mark it as an Accepted Solution, so that others can find answers quickly!
0 Likes
Message 16 of 16

wispoxy
Advisor
Advisor

@Anonymous Use command BATTMAN

0 Likes