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
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.
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
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
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.
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
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.
Many thanks Takshi for the great help, It worked now after exposing “fme_feature_type" in the reader properties dialog.
Many thanks,
Ahmad Saleh