Embedded variables
Use embedded variables to insert parameters into the strings for captions, tool tips, display titles, local messages, and electronic signature's confirmation messages.
There are three kinds of variables that you can embed: numeric, string, and date or time.
Numeric and string variables can be either a tag name, that is read at runtime and the current value is displayed, or literal numeric or string values that will be displayed at runtime as they were entered.
At runtime, date and time variables display the system date or time.
For example, in a local message you can embed a tag name as a literal string and as a numeric tag variable, along with a time variable. At runtime, when the local message is displayed, it displays the tag's name, its value, and the time. As the time and tag value change, the message is updated.
TIP:
Embedded variables are case sensitive, and must use the correct format and syntax to work. If you make a mistake, the variable will be treated as text. For this reason, to avoid problems it is better to use the Insert Variable button to open a variable dialog box, rather than create or edit embedded variables manually.
Embedded numeric variables only show 5 decimal places. If a number contains more than 5 decimal places, the fifth will be rounded.
Literal string variables do not support spaces.
You can create embedded variables in these places:
- Graphic object editor — insert embedded variables in the captions, tool tips, or electronic signature's confirmation message for graphic objects on standard graphic displays, global object displays, and libraries. For graphic objects with multiple states, you can insert different embedded variables in each state’s caption.
- Local Messages editor — insert embedded variables in local messages.
- Display settings dialog box (Properties tab) — insert embedded variables in a display's title bar.
To insert an embedded variable into a caption, tool tip, or electronic signature's confirmation message:
- In the dialog box where you are setting up the caption, tool tip, or electronic signature's confirmation message, click theInsert Variablebutton and select the type of variable you are going to insert.
- In the dialog box for the variable, fill in the information specified.
To insert an embedded variable into a local message:
- In theLocal Messageseditor, right-click theMessagefield and then clickEdit String.
- In theString Editdialog box, clickInsert Variableand click the type of variable you are going to insert.
- In the dialog box for the variable, fill in the information specified.
To insert an embedded variable into a display title:
- Right-click in the display and then clickDisplay Settings.
- In thePropertiestab, select theTitle Barcheck box.
- ClickInsert Variableand click the type of variable you are going to insert.
- In the dialog box for the variable, fill in the information specified.
To create a tag placeholder in an embedded variable:
- In theTagfield, type the cross-hatch character followed by a number (no space in between). For example, #1.
Provide Feedback