Skip to main content
Solved

AttributeFileWriter + newline

  • October 29, 2012
  • 2 replies
  • 111 views

sigtill
Supporter
Forum|alt.badge.img+24
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!
View original
Did this help you find an answer to your question?
<strong>This post is closed to further activity.</strong><br /> It may be a question with a best answer, an implemented idea, or just a post needing no comment.<br /> If you have a follow-up or related question, please <a href="https://community.safe.com/topic/new">post a new question or idea</a>.<br /> 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+24
  • 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!

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