AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Exporting Block attributes to Shape file

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
1281 Views, 2 Replies

Exporting Block attributes to Shape file

Hi,


I want to know, how to to export the attached block with attribute data into shape file.

Can anyone suggest a way around to do this as i have a huge number of such blocks from which i have to extract the data to create point feature in shapefile.

The block, displays the text seen in the graphics and can be seen in Attribute field of Depth and Dec as shown in attached text.png

I have to extracted the data from field Depth and Dec into attribute of shapefile., using MAPEXPORT command, which allows to select the attribute to be exported. But the fields were null in exported shape file but are placed at xyz location in autocad.


Santosh Udyavar

2 REPLIES 2
Message 2 of 3
norman.yuan
in reply to: Anonymous

Firstly, this forum is for Map3D customzation programming. Your question might get better response from more general "AutoCAD Map 3D forum".

 

Anyways, it looks like you have quite unique block references with attributes: the attributes in the block reference are NOT created based on attribute defined in block definition. See the picture below:

MapExport_Block.png

 

In the attribute editing dialog box, the 2 attributes have tags: "DEPTH" and "DEC", but in the MapExport dialog box for data selection, the 2 attributes available for the block (Block Definition!) are "Test" and "0". Also, if you explode the block, you also get 2 attribute definitions with tag "Test" and "0".

 

So, I think the problem is the block references in the drawing were not inserted with AutoCAD built-in command, probably by some kind of application/custom code, which inserted the block references and added attribute reference to the blocks NOT according to the attribute defined in the block definition (I am not sure if you know this: a block reference can have attribute references that is completely different or not defined in block definition).

 

When MapExporting blocks as point and its attributes as shape attribute data, the exporting process uses the block definition to decide what data to be exported. Using block definition makes sense here: now that block reference can have attributes that are not defined in block definition, many block references to the same block definition could each have different attribute references. So, the exporting can only rely on block definition to decide what attributes to export, to guarantee the attribute data being consistent, so that the attribute references in block reference, which do not have corresponding attribute definitions would not be exported.

 

So, in your case, you may need to redefine the block definition and/or reinsert the block references so that the attribute references would have the same tags as in the block definition.

 

Actually, if you try to manually insert the block "Sounding", you would be surprised by what you get. So, the block is bad for MapExport.

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 3
Anonymous
in reply to: norman.yuan

Hi Norman Yuan,
Thanks a lot for your response, even though as you have mentioned I posted my query in Map3D Customaztion programming. I will keep in mind that this forum would be helpful in query related any Customaized tool for Map3D for future.

Secondly, My query was resolved with help of Chicago Looper and АлексЮстасу.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


AutoCAD Beta