Solved

Want to extract geometry and attributes from AutoCAD blocks

  • 10 October 2017
  • 6 replies
  • 68 views

Badge

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?

icon

Best answer by jneujens 11 October 2017, 14:02

View original

6 replies

Userlevel 1
Badge +18

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

Badge
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.

 

 

Userlevel 1
Badge +18
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.

 

 

Badge

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?

Badge

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.

 

 

Badge
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