Quantcast
Channel: Reports & Macros
Viewing all articles
Browse latest Browse all 1118

Change text style of user defined attributes

$
0
0

Hi,

i created multiple Texts by using CreateTextOcc in a single model. I can change the text style of system attributes fine with the setStyledValue method:

var model = ArisData.getSelectedModels()[0]
var modellnameValue = model.Attribute(Constants.AT_NAME, lang,true).GetValue(true)
var modelNameText = model.CreateTextOcc(120,200,Constants.AT_NAME)
modelNameText.TextDef().Attribute(Constants.AT_NAME,Context.getSelectedLanguage()).setStyledValue("<p><b>"+modellnameValue+"</b></p>")

 

Creating the Texts for user defined attributes work as well similarly

var modelDateNum = ArisData.ActiveFilter().UserDefinedAttributeTypeNum("7ec51830-1a99-11e1-54b1-0050569e0006");
model.Attribute(modelDateNum,Context.getSelectedLanguage(),true).setValue("")
var modelDateValue = model.Attribute(modelDateNum,Context.getSelectedLanguage(),true).GetValue(true)
var modelDateText = model.CreateTextOcc(100,100,modelDateNum)

 

but i can't figure out how to change the text style of user defined attributes.


Viewing all articles
Browse latest Browse all 1118

Trending Articles