Skip to main content

I am new to FME ...simple question. I have a Feature Writer, which I would like to name with the value from the attribute (@Value(myattribute)_example.dwg) that I can see is there from the logger, but the writer fails to find the value of the attribute, it only creates an empty file with "_example.dwg" with the geo features and an empty file with foo_example.dwg ... I am able to use the reader with file name from @Value(attrr) (I am using the latest version FME desktop trial 2019.2.3.1) I would appreciate any tips ...thanks

It sounds like you are sending one feature with the attribute into the writer, but all other features that are entering the feature writer don't have the attribute populated. All features that need to be written to the file must have the attribute populated. If you are using @Value(myattribute) as a fanout but have the flow set up like below, you will get a file correctly named but mostly blank, and a file incorrectly named but with all the data in

You need to merge the streams before writing


Thank you ebygomm for the answer, I am reading from GML file and writing to DWG file, I would like to write to a DWG file with a Layers per feature. (I have like "one to one" connection) I can read the attribute in the Reader (when I log the initiator) if I add it to each feature, I don't have an error int the Writer but when I run it, the attribute value is empty ("") ... (something like this)


If the information is in your initiator for your feature reader, under attribute and geometry handling choose merge initiator. This will mean all the features read have a populated attribute for writing

 


Thank you ebygomm for the answer, I am reading from GML file and writing to DWG file, I would like to write to a DWG file with a Layers per feature. (I have like "one to one" connection) I can read the attribute in the Reader (when I log the initiator) if I add it to each feature, I don't have an error int the Writer but when I run it, the attribute value is empty ("") ... (something like this)

If the information is in your initiator for your feature reader, under attribute and geometry handling choose merge initiator. This will mean all the features read have a populated attribute for writing

 


merging initiator and results worked for me, thank you!


Reply