Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: DanielL on November 02, 2010, 10:18:08 pm

Title: formatting notes from elements
Post by: DanielL on November 02, 2010, 10:18:08 pm
Hello,

I want to add an note to an element via the SDK API. This works fine. But I'm not able to add a formatted string.

I have seen, that the EA uses HTML style formats for notes of elements.

I tried to add a note with a string like this:

"<div><p>my note</p></div>".

But if you look later into the EA you see exactly the string without any formatting.

Is it possible to add new notes with HTML-style string formats to the elements?

best regards

Daniel
Title: Re:  formatting notes from elements
Post by: Eve on November 03, 2010, 08:34:06 am
Look for GetFieldFromFormat (string Format, string Text) in the user guide.

Converts a field from your preferred format to Enterprise Architect's internal format. Returns the field in Enterprise Architect's internal format.

Parameters:

Format: String - The format to convert the field from. Valid formats are:
HTML - Full HTML
RTF - Rich Text Format
TXT - Plain text
Text: String - The field to be converted.
Title: Re:  formatting notes from elements
Post by: DanielL on November 03, 2010, 06:26:50 pm
Thank you!

It works fine.

Daniel