hexagon logo

Header Tracefield conditional text color

I'm trying to use a Tracefield in the header that shows the number of out of tolerance dimensions. How can I make it green for 0 and red for any other color. Either the text itself, or the background color would be great!
Parents
  • Here's a pic of the header I'm working on. I have a block that has the Tracefield(15) which is GETPROGRAMINFO("NUMOOT") . I can't figure out how to make it change colors from green to red when it's greater than 0

    Attached Files
  • I was messing around with Edit window expressions, and I managed to get the colors to change depending on the "NUMOOT". Only thing is, the colors are limited within the edit window. Not sure if this would give you any ideas.

    IF/GETPROGRAMINFO("NUMOOT")==0
         ASSIGN/V1=GETPROGRAMINFO("NUMOOT")
         ASSIGN/V2="~~1 " + V1
    END_IF/
    ELSE_IF/GETPROGRAMINFO("NUMOOT")>0
         ASSIGN/V1=GETPROGRAMINFO("NUMOOT")
         ASSIGN/V2="~~4 " + V1
    END_ELSEIF/
    TRACEFIELD/DISPLAY=NO,REPORT=YES,DISPLAY MESSAGE=How many dimensions are out of Tolerance? ; Dimensions Out Of Tolerance : V2​
    
Reply
  • I was messing around with Edit window expressions, and I managed to get the colors to change depending on the "NUMOOT". Only thing is, the colors are limited within the edit window. Not sure if this would give you any ideas.

    IF/GETPROGRAMINFO("NUMOOT")==0
         ASSIGN/V1=GETPROGRAMINFO("NUMOOT")
         ASSIGN/V2="~~1 " + V1
    END_IF/
    ELSE_IF/GETPROGRAMINFO("NUMOOT")>0
         ASSIGN/V1=GETPROGRAMINFO("NUMOOT")
         ASSIGN/V2="~~4 " + V1
    END_ELSEIF/
    TRACEFIELD/DISPLAY=NO,REPORT=YES,DISPLAY MESSAGE=How many dimensions are out of Tolerance? ; Dimensions Out Of Tolerance : V2​
    
Children
No Data