Skip to main content

I want to extract the geometry and attributes from AutoCAD blocks in a .DWG file. This seems to be problematic as the information extracted by the Reader doesn't appear the information in the block.

So, how can I get this information?

Hello @michaellampi,

Here are some useful links:

https://knowledge.safe.com/articles/27244/viewing-and-inspecting-autocad-dwg-data-handling-b.html

https://knowledge.safe.com/articles/18737/tutorial-getting-started-with-autocad-and-fme.html

https://knowledge.safe.com/articles/27245/basic-dwg-block-handling-example-exploding-block-e.html


Thank you.

 

I read the docs, tried a number of things, thought I had it but the results are generally empty.

 

 

The empty fields are all the "fme_attrib_info..." fields.

 

 

Here are some of the empty fields I'm trying to export:

 

fme_attrib_info_0_.style

 

fme_attrib_info_0_.field_value

 

fme_attrib_info_1_.field_value

 

fme_attrib_info_2_.field_value

 

 

The fields that *aren't* "fme_attrib..." are appearing.

 

 


Thank you.

 

I read the docs, tried a number of things, thought I had it but the results are generally empty.

 

 

The empty fields are all the "fme_attrib_info..." fields.

 

 

Here are some of the empty fields I'm trying to export:

 

fme_attrib_info_0_.style

 

fme_attrib_info_0_.field_value

 

fme_attrib_info_1_.field_value

 

fme_attrib_info_2_.field_value

 

 

The fields that *aren't* "fme_attrib..." are appearing.

 

 

Please share your workspace and some test data.

 

 


Without exploding the blocks, use an attributeexposer to expose your attributes (like 'DECK', 'FIRE_ZONE', etc.). If that does not work, something else is going wrong and we can have a look at your data?


Without exploding the blocks, use an attributeexposer to expose your attributes (like 'DECK', 'FIRE_ZONE', etc.). If that does not work, something else is going wrong and we can have a look at your data?

Thank you! Your suggestion plus some help from Safe Software support got me to where I needed to go.

 

 

Here is what the support team said:

 

You can expose the block attributes when you add the AutoCAD reader by
clicking the Parameters button for the reader, and selecting 'Attribute
Schema' for the Group Entities setting. This will cause FME to scan the
DWG file for all the block attributes, and make then available in
Workbench.

 


 


By default, FME will explode the blocks into their source components.
This will create multiple copies of some blocks, so I recommend
disabling this in the Reader Parameters, by unchecking the Explode
Blocks into Entities box. With this disabled, a single point will be
read for each block, with the block attributes attached.

 

 


Thank you! Your suggestion plus some help from Safe Software support got me to where I needed to go.

 

 

Here is what the support team said:

 

You can expose the block attributes when you add the AutoCAD reader by
clicking the Parameters button for the reader, and selecting 'Attribute
Schema' for the Group Entities setting. This will cause FME to scan the
DWG file for all the block attributes, and make then available in
Workbench.

 


 


By default, FME will explode the blocks into their source components.
This will create multiple copies of some blocks, so I recommend
disabling this in the Reader Parameters, by unchecking the Explode
Blocks into Entities box. With this disabled, a single point will be
read for each block, with the block attributes attached.

 

 

Indeed! Glad you resolved your issues!

Reply