Skip to main content

Reading an AutoCAD dwg, how do you get the entity handle of a piece of block text while also retaining an attribute to relate the text to its block?

In my workbench I have the following parameters, which seem applicable, set:

- Expand Blocks into Entities: Yes

- Read Visible Attributes as Text Entities: Yes

This gets me the block text entity with its autocad_entity_handle attribute set, but none of the attributes I can tell relate it back to the block from which it was exploded. It would seem that the autocad_block_name and autocad_block_number attributes would do this but they don't get populated.

I am using FME Desktop 2016.1.1.0.

Hi @_trent

could you please share a sample of your data? You are correct: autocad_block_number is the attribute that should help you link block elements together. Let's take a closer look at the data.

One detail: I would also suggest checking Preserve Insert Points in Reader parameters to read block insert points as separate geometries.


Hi @LenaAtSafe,

I am using FME Workbench 2017.1 (The original post is a bit old).

I've attached a .dwg that includes 2 sample blocks. blocksforsafe.dwg

I've also included a few screenshots of the current reader settings. readersettings-1.pngreadersettings-2.pngreadersettings-3.png

I've edited to add a screenshot of the FME Data Inspector where the attribute has no autocad_block_name, autocad_block_number for the block(s)

fme-datainspector.png


Hi @_trent let me know if this looks right.


Hi @_trent let me know if this looks right.

Yes, @frankzander, those are (sort of) correct - those are the attributes and their block names and values. The difference is that handle: It is coming up different for each of those tags, and each exploded feature of the block; it's not 2A9 for the 255 value, and the 132 value and all of the 123 values; it's 2A9 for only one of those values, or the block point itself (and I don't know which one without seeing your run...I don't have a 2A9 in my run). Do you have some other setting than I had in those screenshots of our reader? - fingers crossed you do and can fix this! :)

 

 

The problem comes when we explode the blocks, and pull out those (visible) values as entities (in the Reader: Read Visible Attributes as Text Entities). I've included a screenshot with the four exploded 24CT_CALLOUT features highlighted (visually, it's the rectangle with the 35 OF NEW 24CT text at the bottom). Feature 2 in the highlighted list is the visible text of "35" Value you have listed above; the Visible Attribute read as a Text Entity; the feature we're after. I have no way to link it back to the other 3 portions of the block (the attribute definition, the standard text within the block or the rectangle).

 

 

fme-datainspector-24ct-callout.png

 

 

 


Hi @_trent

could you please share a sample of your data? You are correct: autocad_block_number is the attribute that should help you link block elements together. Let's take a closer look at the data.

One detail: I would also suggest checking Preserve Insert Points in Reader parameters to read block insert points as separate geometries.

Lena - I re-ran some test data in 2017.1 with the same result. Below are screenshots of my reader parameters and an inspector of the output attributes. Does a way exist for me to privately supply the source dwg file?

 

 

The text 27, 28, 33, 34 are parts of the block LBSC.

 

 

 


@_trent, @LenaAtSafe, frankzander

any updates towards this?

Thanks!


Reply