Skip to main content
Solved

AttributeFileWriter + newline

  • October 29, 2012
  • 2 replies
  • 148 views

sigtill
Supporter
Forum|alt.badge.img+25
Trying to use an AttributeFileWriter and insert a newline within my concatenaed string. So I want the following attribute

 

 

myAttrib= 'Firsttext \\n Lasttext'

 

 

to be written to a file like this:

 

 

Firsttext

 

Lasttext

 

 

I see there is an Append-mode in FME 2013 - but I assume it should be possible to add linebreaks also to the FME2012? All help appreciated

Best answer by sigtill

Found a workaround. Had to use a StringReplacer to replace \\n with LN (FME-s internal code for new line) and then it worked like a charm!
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, 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.

2 replies

Forum|alt.badge.img+4
  • October 30, 2012
I don't think such functionality is currently encapsulated within the AttributeFileWriter. If it is, I likewise cannot get it working.

 

 

I'd recommend the Text File writer instead if such is a possibility. Creating a pretty HTML report via the Text file could be the way if you're after writing statistics.

 

 

If you don't want to use a Writer, perhaps the Recorder can be of use.

sigtill
Supporter
Forum|alt.badge.img+25
  • Author
  • Supporter
  • Best Answer
  • October 31, 2012
Found a workaround. Had to use a StringReplacer to replace \\n with LN (FME-s internal code for new line) and then it worked like a charm!