Hello all,
I am new to this website. I dont know if this is the right place to post issues like this but Ill give it a try although someone might through a rock at me.
I have been scripting for a couple of years in ARIS and have found a couple of bugs, I have been trying to submit these to the ARIS support but with no luck. I thought I might give this a try.
However, right now I am working on a script which is copying textoccs and I have a problem with the fontstyle. It works for the non attribute textoccs but not for the attribute ones.
Textocc1 does have character formatting and is bold.
When I create Textocc2 I use the textdef of Textocc1.
I checked the FontStyleSheet of Textocc1 and it says nothing about bold style, I also tried to set it myself with setFontStyleSheet.
FontStyleSheet().Font(loc).Style() = 0
Apparently the scripting module cant handle character formatted text, is that right?
Also, if I set the Style to bold manually it doesnt work. Is it just me or has anyone gotten this to work?
Im using ARIS IT Architect 7.1
/Robert
Torsten Haase on
Hi Robert,
the way to set bold font in a font style sheet is the following:
[myFontStyleSheet].Font( Context.getSelectedLanguage() ).setStyle( Constants.FMT_BOLD )
You can use character formatting using HTML tags for all textoccs (in fact: for all text attributes!):
var sHTMLValue = [textocc].TextDef().Attribute(Constants.AT_NAME,Context.getSelectedLanguage() ).getStyledValue().getHTML()
now use HTML tag <b>...</b> in this string to format all (or some) characters as bold and write it back using
[textocc].TextDef().Attribute(Constants.AT_NAME,Context.getSelectedLanguage() ).setStyledValue(sHTMLValue)
If you want to apply character formatting to placed model attribute texts, you will have to format the placed model attribute this way and not the textocc itself, because it is just a "link" to the attribute value. But stylesheets are supported for both "kinds" of textoccs.
BR, Torsten