Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ilario on October 21, 2008, 10:29:45 pm

Title: creating formatted notes in VB skript
Post 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.
Code: [Select]
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
Title: Re: creating formatted notes in VB skript
Post by: «Midnight» on October 21, 2008, 10:44:05 pm
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.
Title: Re: creating formatted notes in VB skript
Post by: ramhog69 on October 22, 2008, 02:16:29 am
Is it because of capitalization of styleex, should be StyleEx?

Kalvin
Title: Re: creating formatted notes in VB skript
Post by: «Midnight» on October 22, 2008, 09:08:44 am
No.
Title: Re: creating formatted notes in VB skript
Post by: Dermot on October 22, 2008, 04:46:44 pm
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.