Skip to main content
Solved

Area builder transformer removes the fields/attributes of the inserted autocad layer.


ahmad_saleh
Forum|alt.badge.img
Hi,

 

I have a workbench which mainly converts form Autocad to Geofatabase API writer, Area builder transformer was used in this workbench and it appears that it removes the fields such as FME/Autocad color, and I couldn’t figure out what the best method to hold them, what is the best practice to attain this job?

 

 

 

Thanks

 

Ahmad Saleh 

Best answer by takashi

Generally list elements cannot be written into attributes of writer feature type directly. You have to pick an element and change it to a non-list attribute beforehand.

 

For example, the ListIndexer would be a quick way to demote the first element of the list. In this example, the first element values of the "MyList{}" will be stored by the non-list attributes "autocad_color", "autocad_layer" and "Approval_Date". You can then write them into the destination dataset.

 

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

8 replies

takashi
Influencer
  • June 29, 2015
Hi Ahmad,

 

 

The AreaBuilder doesn't preserve attributes other than the "Group By" attributes.

 

If values of "fme_color" and "autocad_color" are identical in all features, you can set them to the "Group By" so that they will be preserved.

 

Otherwise, set a list name to the "Polygon List Name" parameter to store the original attributes into a list, and then pick a preferable element from the list after building area.

 

 

Takashi

gboquin
Contributor
Forum|alt.badge.img+5
  • Contributor
  • June 30, 2015
Ahmad..

 

Have you considered adding a spatial relator after the area builder? Basically feed the same data to te spatial relator as indicated below.. and you should get what you need. you ight have to modify the connections depending on what you need.

 

I hope this helps.

 

 


ahmad_saleh
Forum|alt.badge.img
Hi Gerry,

 

Thanks for your input but in my case I need all data (attributes) to be written, so what should I fill “Test to preform” dialog

 

 

 

 

Many thanks,

 

Ahmad Saleh 

ahmad_saleh
Forum|alt.badge.img
Hi Takashi,

 

Thanks for your replay, I tried to set a list name for the area builder transformer it seems that it preserves the field names but not the data inside them and this could be happen if the name of the list “MyList {} in my case” was truncated form the field name, but it fails to write the attributes.   

 

 

 

 

 

 

Many thanks,

 

Ahmad Saleh 

takashi
Influencer
  • Best Answer
  • July 12, 2015
Generally list elements cannot be written into attributes of writer feature type directly. You have to pick an element and change it to a non-list attribute beforehand.

 

For example, the ListIndexer would be a quick way to demote the first element of the list. In this example, the first element values of the "MyList{}" will be stored by the non-list attributes "autocad_color", "autocad_layer" and "Approval_Date". You can then write them into the destination dataset.

 


ahmad_saleh
Forum|alt.badge.img
Hi Takashi,

 

Many thanks for your help, it seems to work now, but does it change in bevaiour of FME, because I am using SchemaMapper to join the AutoCAD color attribute to excel file , it used to work before adding the area builder and now it gives the following error “SchemaMapper_Mapper(SchemaMappingFactory): A required column was not found in the table. Row fme_feature_type will be skipped

 

A required column was not found in the table. Row fme_feature_type will be skipped

 

|ERROR |

 

A fatal error has occurred. Check the logfile above for details”.

 

 

 

 

What might be the problem.

 

 

 

Many thanks,

 

Ahmad saleh

takashi
Influencer
  • July 12, 2015
If the feature type name of source features are identical, try setting "fme_feature_type" to the "Group By" parameter of the transformer.

 

You can expose "fme_feature_type" in the reader feautre type properties dialog, or by the AttributeExposer transformer. 

 


ahmad_saleh
Forum|alt.badge.img
Many thanks Takshi for the great help, It worked now after exposing “fme_feature_type" in the reader properties dialog.

 

 

 

Many thanks,

 

Ahmad Saleh

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings