GefTextFormat.TranslateExprResult (property)

Gets and sets the TranslateExprResult flag.
Syntax: Boolean = object.TranslateExprResult
object.TranslateExprResult = Boolean
Description: When this property is true the result of the TextExpression evaluation will be translated before it is displayed on the screen. Translation will only occur if the result of the evaluation is a string. Numeric results will not be translated. This will enable the translation of expression results that contain points with enumerations configured. If the expression contains any string literals those will will put put into the CLM file configured for the screen so that they can be translated. Also, all enumeration values in a project will be put into the CLM file.

Example:

Sub GefTextFormat_TranslateText()
    
    Dim oCimObj As GefObject
    Dim oCimTxtFmt As GefTextFormat
    
    Set oCimObj = CimGetObject
    Set oCimTxtFmt = oCimObj.TextFormat
    If Not oCimTxtFmt Is Nothing Then
        oCimTxtFmt.Text = "Water"
        oCimTxtFmt.TextExpression = "(temp GT 100) ? " & Chr$(34) & "Hot"_
                     & Chr$(34) & " : " & Chr$(34) & "Warm" & Chr$(34)
        oCimTxtFmt.TranslateExprResult = True
        CimGetScreen.Refresh False
    End If
    
End Sub