Skip to main content

Hello,

i'm trying to solve a problem with AUTOCAD dynamic blocks. I'm looking for the original name when they come with "*Uxxx" name.

I created an invisible attribute "HIDENAME", defined as "constant" in each block definition (Autocad user's must not see it). The value of this attribute matches the original name.

I don't see this attribute in FME Data inspector ...

(ps : I don't want to explode blocks to solve the problem)

Hi @thierry,

With regards to the block name... it looks like a similar question was asked in the past as well. Unfortunately, this functionality still isn't available in the AutoCAD Reader; there is a great explanation regarding this behavior on this thread: AutoCAD Dynamic Block Name

 

However, since you have created an invisible attribute that is the same as the original block name you should be able to access this attribute by exposing the fme_attrib_info{}.field_value format attribute in the writer parameters and then using a ListExploder to get the attribute values into the feature table. Attached is an example of how you can accomplish this - [modified] sample data thanks to this AutoCAD forum thread.

 

Note: exploding the list isn't required, you could leave the block attributes in a list and assign values based on the list element number (i.e. fme_attrib_info{1}.field_value) as shown with the AttributeManager.

 

Workspace: Dynamic_Block_Attribute_Example.fmwt

 

Hope this helps.


Hi @thierry,

With regards to the block name... it looks like a similar question was asked in the past as well. Unfortunately, this functionality still isn't available in the AutoCAD Reader; there is a great explanation regarding this behavior on this thread: AutoCAD Dynamic Block Name

 

However, since you have created an invisible attribute that is the same as the original block name you should be able to access this attribute by exposing the fme_attrib_info{}.field_value format attribute in the writer parameters and then using a ListExploder to get the attribute values into the feature table. Attached is an example of how you can accomplish this - [modified] sample data thanks to this AutoCAD forum thread.

 

Note: exploding the list isn't required, you could leave the block attributes in a list and assign values based on the list element number (i.e. fme_attrib_info{1}.field_value) as shown with the AttributeManager.

 

Workspace: Dynamic_Block_Attribute_Example.fmwt

 

Hope this helps.

Hi @chrisatsafe

thank you for your help. It's the problem, i see all my attributes in fme_attrib_info{} but not the one flagged as "Constant" for Autocad.

See the attachment

(I turned attribute "HIDENAME" visibility to "yes" for the explanation)

 


Hi @chrisatsafe

thank you for your help. It's the problem, i see all my attributes in fme_attrib_info{} but not the one flagged as "Constant" for Autocad.

See the attachment

(I turned attribute "HIDENAME" visibility to "yes" for the explanation)

 

Hi @thierry,

After digging around a bit more, I was able to find this similar Community Forum Thread. It turns out The 'PK' constant value is part of the graphical content of the block, rather than an attribute, so there is no way to extract it without exploding the block.


Hi @chrisatsafe,

i saw this thread, and unfortunaly exploding the block seamed to be the only solution. I'll try a workaround by analyzing autocad DynamicBlockTableRecord to see if it's faster.

or wait for the functionality ... ;)