Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: mcoletti on July 30, 2014, 03:25:45 am

Title: How can I insert a new line in DocumentGenerator
Post by: mcoletti on July 30, 2014, 03:25:45 am
Hi, I have to perform the method InsertText, and then insert a new line in the generated document before the other fragments.

How is it possible  :question

Thanks, Massimo
Title: Re: How can I insert a new line in DocumentGenerat
Post by: Tehila1 on July 30, 2014, 06:36:42 pm
It is possible, using the InserText method:

Try : generator.InsertText("\f", format);

Look here: http://stackoverflow.com/questions/21674865/does-c-sharp-provide-an-equivalent-to-n-for-denoting-a-page-break
Title: Re: How can I insert a new line in DocumentGenerat
Post by: mcoletti on August 05, 2014, 12:29:30 am
I tried, but also \f doesn't work; I tried also \par (the RTF code)

The solution is to insert a chr(13) in the text, apparently, escape characters aren't recognised.

 :)