Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: zalbina on November 21, 2012, 07:10:09 pm

Title: API: Insert Text in RTF report
Post by: zalbina on November 21, 2012, 07:10:09 pm
Hello,

I'm using API for creation RTF report and running into the one problem: when I'm writing a new line I wanted to use a font style which is different from Normal style and after report generation I see the style is Normal anyway.
The code is:
EA.DocumentGenerator generator = new Repository.CreateDocumentGenerator();
generator.NewDocument("MyDocument");
generator.InsertText("BlaBla","Title"); //NOT Normal

Someone has any solutions for it?

Thanks.
Title: Re: API: Insert Text in RTF report
Post by: RobCDeJong on November 21, 2012, 08:53:10 pm
Adding a "\n" to the text will help:

generator.InsertText("BlaBla\n","Title");
Title: Re: API: Insert Text in RTF report
Post by: zalbina on November 21, 2012, 09:30:56 pm
Thanks a lot. Soooooo simple :).