Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ilario on October 21, 2008, 10:29:45 pm
-
I coded a piece of software, which happily produces classes and attributes at a fingertip.
The problems started, when I wanted to add formatted notes to the attributes.
My documentation is enriched with html tags and EA 7.1 renders them correctly - as long as I manually update t_attribute.StyleEx with volatile=0;
Unfortunately setting StyleEx within my VB-Skript produces errors.
Set newAttribute = newILBClass.Attributes.AddNew(name,EnumCodeElementType.ctAttribute)
newAttribute.styleex = "volatile=0;" ' <<<== this throws an error
newAttribute.Update
...
newAttribute.Notes = documentation
newAttribute.Update
Can anybody help me?
greetings
Ilario
-
I think this is worth an immediate bug report. At the very least, the documentation for StyleEx still (as of build 831) says "...Not currently used." Something is wrong somewhere.
Surprising that this does not get reported more.
-
Is it because of capitalization of styleex, should be StyleEx?
Kalvin
-
No.
-
I am not sure if I read the original post correctly - when reffering to formating in the notes is that EA rich text formating? If so, try using the EA-SDK routines:
GetFieldFromFormat (string Format, string Text)
GetFormatFromField (string Format, string Text)
See the help for details.