Symbols

To configure display symbols | To configure symbol values

A symbol is a placeholder for a value that can be substituted at run time from a symbol file. You can define a symbol in a display by enabling it and giving it a name. Symbol substitution is permitted for the following:

For example:

You have a grid in a display that displays tags. You want to be able to swap one of the tags easily and quickly. Using symbol substitution for the data source, you could set up a button that will load a symbol file. The symbol file (when enabled in the display) will swap the currently displayed tag in the grid for the symbol substitute (in run-time). The next time the display is accessed, the original tag is displayed.

For example:

You have a text caption on a display that you want to change when the user presses a button. Using symbol substitution for the caption property, you can set up a button that will load a symbol file. The symbol file (when enabled in the display) will swap the currently displayed text in the Text object for the symbol substitute (in run-time). The next time the display is accessed, the original text is displayed.

For example:

You have a Time chart in a display that plots the values of a tag. You want to be able to swap the start date/time and end date/time for the tag when the display is first opened. Using symbol substitution for the StartDateTime and EndDateTime parameters, you could set the display to load the symbols when it is opened (by setting the symbol file in the Edit Current Display dialog box). The symbol file (when enabled in the display) will swap the currently displayed tag values in the Time chart for the tag values that are based on the date/time parameters (in run-time).

Creating Symbols

Symbols are defined by creating a symbol file from an existing display. Open the display where the data sources, properties, and/or parameters exist that you want to set symbols for. Access the Edit Display Symbols dialog box (Edit menu | Display Symbols). If data sources exist in the current display, they will appear on the Data Sources tab. Likewise, if Properties exist in the current display, they will appear on the Properties tab. The Defined Symbols tab displays any symbols already defined on the current display (that are enabled). To enable a symbol, select the Enabled check box and, if necessary, change the name of the symbol by double-clicking in the Symbol field.

Some restrictions apply when naming symbols. Symbol names:

Creating Duplicate Symbols

In many cases, you may want to re-use the same symbol multiple times in a display. For example, if you have a chart and a datalink in a display that both access the same data source when the display is opened, you can set the data source symbol for the chart, and then set the data source symbol for the datalink, giving it the same name as the chart's symbol value. When the symbol file is saved, the first reference is saved as the symbol value. When the symbol is applied, the same value (the first reference) is applied to both the chart and the datalink.

The following rules apply when re-using symbol values:

NOTE: To change the name of a symbol in the Edit Display Symbols dialog box, the symbol must be enabled (select the Enabled check box beside the symbol name).

If you need to edit a symbol value, where there are multiple symbols, make sure that you are changing the first reference. Changing the other references will have no effect, as only the first reference is used.

Editing Symbol Values

Symbol values associate a symbol name with a substitution value. Symbol values for properties can be any combination of printable characters, including the marks of punctuation, numbers, and letters. For data sources, the symbol value is the data source item, and for parameters, the symbol value is the parameter value.

After a symbol file has been created, symbol values can be modified from the Edit Symbol Values dialog box. See To configure symbol values for more information.

Applying Symbols

After symbol files have been created, they can be applied to a display in the following ways:

In addition to loading the symbol file, the Symbol(s) must also be enabled in the display. To do this, open the display you want to load the symbol(s) into, access the Edit Display Symbols dialog box, and select the Enabled check box for each symbol you want to enable.

Merging Symbol Values

Symbol values can be merged from a display or a symbol file. When symbol values are merged, they combine to form one symbol file. The Edit Display Symbols dialog box or the Edit Symbol Values dialog box can be used to merge symbol values.

Only symbols from the display or symbol file that do not already exist in the target file will be available for merging. If a symbol appears in the Get Symbols From list with the Merge check box cleared, then a conflict exists with a symbol in the target file. Usually a conflict is caused by naming; that is, the name of the symbol in the two files or displays have the same name.

See To merge symbol values from a symbol file and To merge symbol values from a display for more information.