Alarm Custom1 property string data fails to display on graphics page.

Hello.

In my project I want some static alarm property information to be displayed on graphics pages.
Our static information is written as strings in the alarms table fields "Alarm Desc" and "Comment" properties.
Displaying the information in the "Alarm Desc" property performs well using a string expression like "AlarmTag.Desc" on the graphics page.

For some reason, displaying the string value in the property "Comment" by putting the string expression "AlarmTag.Comment" on the graphics page fails. The error message "Some variable tags were not found" shows up. Seems that the "Comment" property is not supported for access on the graphics page.

So in order to display the information in the "Comment" field on a graphics page I tried to copy the string in this field into the "Custom1" field and put the string expression "AlarmTag.Custom1" on my graphics page but nothing appears on the graphics page at runtime. Neither information or error code, simply nothing.

Can somebody enlighten this issue?

Parents
  • StrToLines() is similar and seems simple. However, it has 2 limitations: (1) It writes the line count to a Cicode variable which you must pass to the function. So, you can't call it directly from a graphics object's display expression. You'd have to write a wrapper Cicode function to call it. (2) It has no limit for the number of lines of text it creates. If you have a small box on the screen to display a string in, StrToLines will keep you from overflowing the width of the box, but will not prevent you from overflowing the height. My function allows you to set the max number of lines of text and it adds "..." to the end if it has to truncate text to fit.
    It might have been simpler for my function to just call StrToLines() to do the splitting, and if too many lines were returned, then search for the nth newline character and truncate the string. If I was rewriting it, I'd probably use StrCalcWidth() to get the right width according to the text displayed and the font used. For example: capital letters and symbols are usually wider than lower case or punctuation, so wrapping at a hard-coded number of characters may not display correctly unless you use a monospace font like Courier New.
Reply
  • StrToLines() is similar and seems simple. However, it has 2 limitations: (1) It writes the line count to a Cicode variable which you must pass to the function. So, you can't call it directly from a graphics object's display expression. You'd have to write a wrapper Cicode function to call it. (2) It has no limit for the number of lines of text it creates. If you have a small box on the screen to display a string in, StrToLines will keep you from overflowing the width of the box, but will not prevent you from overflowing the height. My function allows you to set the max number of lines of text and it adds "..." to the end if it has to truncate text to fit.
    It might have been simpler for my function to just call StrToLines() to do the splitting, and if too many lines were returned, then search for the nth newline character and truncate the string. If I was rewriting it, I'd probably use StrCalcWidth() to get the right width according to the text displayed and the font used. For example: capital letters and symbols are usually wider than lower case or punctuation, so wrapping at a hard-coded number of characters may not display correctly unless you use a monospace font like Courier New.
Children
No Data