All,

I am having issues using a report to read the Color/Style of attributes from an occurrence in a model.  I am trying to determine if the name of the object is in Red, Black, or another color.  My current code is shown below.

function getFontColor(oOccDef)
{
    //Get the attribute definition from the current object occurrence 
    var Attr_Occ = oOccDef.AttrOcc(Constants.AT_Name);

    //Get the color of the font from the attribute
    var Attr_Font_Color = Attr_Occ.getFontStyleSheet().Font(nLocale).Color();
    
    return Attr_Font_Color;
}

 



However, regardless of the color of the font, the return value is always '0'.

Please advise on any action I could take to remedy this issue.

Thank you!

 or register to reply.

Notify Moderator