Output Data blocks to excel

Output Data blocks to excel

info9774E
Explorer Explorer
5,984 Views
5 Replies
Message 1 of 6

Output Data blocks to excel

info9774E
Explorer
Explorer

For a project I need to extract properties data from AutoCad to Excel. 

 

I've got a hundreds of blocks with nested objects in it. Now I need to to export some data to excel. 

From the main block I want to know the x and y position plus the length and the width.
Important is that the export shows a list which nested objects each main block contains. And what parameters these nested objects have (pos. x, pos. y, rotation, mirror). 
Sounds quite confusing, so please see the attachments for example an of the blocks and excel sheet with the wanted outcome (filled in manually).

If there are any questions please let me know. 

Thanks in advance, 

Tom Wijnholt

0 Likes
5,985 Views
5 Replies
Replies (5)
Message 2 of 6

vinodkl
Mentor
Mentor

Hi,

 

How did you output this data from autocad to excel?

You could use the the built in tool "DATAEXTRACTION" to extract the data from AutoCAD to excel.

using Data extraction data like position X, Y, Z rotation can be exported to excel, but there is no option of mirror.

--------------------------------------------------------------------------------------------------------------------------
ವಿನೋದ್ ಕೆ ಎಲ್( System Design Engineer)
Likes is much appreciated if the information I have shared is helpful to you and/or others.

Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.
--------------------------------------------------------------------------------------------------------------------------
Message 3 of 6

SeeMSixty7
Advisor
Advisor

The Data Extraction will work for some of this, but the specifics of what you want would need to be done via AutoLISP or another API. I would suggest moving this post or posting in the AutoLISP forum. There are plenty of folks over there that could probably help. I'll see what I can put together for you.

Message 4 of 6

info9774E
Explorer
Explorer

Hi,

 

For this example I just filled in the excel sheet manually. 

 

I tried the data extraction command. But the problem is that it doesn't show which nested objects each block contains.

So instead of showing the block with the nested objects in one row in excel, it just creates different rows for each block existing block. So it's not clear which blocks belong to the main block.

 

I did notice in properties that if a block is a mirrored that 'scale x = -1'  and if it's not mirrored the value is 'scale x = 1' 

This way it should be possible to determine if a block is mirrored or not.

 

Thanks for the reply.

0 Likes
Message 5 of 6

info9774E
Explorer
Explorer

Thanks for the reply. 

I posted this post in the Lisp forum as well, thanks for the tip. 
Thanks for the help, let me know if you can find a solution for this problem. 

 

0 Likes
Message 6 of 6

ara_neresesian
Collaborator
Collaborator

HI

i think on this way for mirror.

IF IN THE GEOMETRY  ,THE SCALE OF X  WAS NEGATIVE ,THAT MEAN THE BLOCK MIRRORED .

 

0 Likes