Symbol Object References, Substitutions and Evaluations

Pre-defined symbols are stored in the Library folders of the Management View. These symbols are visible and editable from the Graphics Library Browser. Advanced users create their own Symbols.

info

NOTE:
You can only create, edit, and delete Symbols in the Graphics application if you have Create level access for the Graphics Library Browser. Create level access is defined in the Security application.

 

Object to Symbol Association

Object referencing for a Symbol instance on the canvas is manually referenced in the Symbol Instance properties group of the Property View. The Object Reference property allows you to associate the Symbol to an object model property, or a function property.

Manually engineering a Symbol to associate it with an object reference involves:

 

Syntax for Object to Symbol Associations

The easiest way to associate a Symbol to an object is by dragging the object from System Browser over to the Symbol Instance. If you choose to manually enter the object references, you must use the proper syntax to make the associations:

Symbol Instance Property Substitutions

When the Symbol instance is selected on the graphic, the Symbol Instance properties display in the Properties view. Some Symbols come with built-in variations, called substitutions. For example, to change the Symbol’s orientation on the graphic. If a Symbol instance has any allowable variations, the Substitutions section is the first section to display. This section does not display in the Properties view for Symbol instances without substitutions. A Symbol Instance may include one or more substitution variations.

In the Properties view >Substitutions section, the variable property containing a star substitution * before it, is bound to the Symbol Instance > Object Reference value (see below.) When you drag a data point from System Browser and drop it over the Symbol Instance > Object Reference field it is bound to the substitution containing a star substitution “*”.

 

Substitution Parameters

The other Substitutions properties are writable, variations that affect things like the Symbol Instance direction on the graphic, or the Fill color, or if a duct is included or not, for example. These substitutions, use values entered manually into the fields to determine how they will look.

NOTE: Substitutions cannot be viewed in Design Mode. You must be in Test or Runtime mode to see how the variation options affect the Symbol instance on the graphic.

Example

The following fan: DYN_3D_Fan_Air_Analog_Up_001 has the following Substitutions available:

 

Substitutions

Set of Values

*FanVariable

Fan working with analog tags.

*This field is populated when you drag-and-drop a data point from System Browser over the Symbol > InstanceObject Reference field.

FanForm

0 = Fan form type 1 (Default value)
1 = Fan form type 2
2 = Fan form type 3

FillColor

0 = Blue (Default value)
1 = Green
2 = White

IncludeInDuct

0 = Duct piece elements invisible (off)
1 = Duct piece elements visible (on)(Default value)

Motor

0 = Shows motor and drive belt (Default value)
1 = Hides motor and drive belt

About Symbol Property Substitution

Substitution Syntax

A substitution is created by adding brackets {…} into a properties evaluation of a graphic element within a Symbol.

Star Substitutions

Star {*} substitution is used as the connection between the drag-and-drop, which is the object source reference, and the internal Symbol substitution mapping. A substitution becomes a star-substitution when the name is empty or starts with an asterisk (*). A Symbol can have more than one star-substitution. They are all linked to the Object Reference property and are all read-only. Star-substitutions are read-only. The value can only be modified by changing the Object Reference property.

Star Substitutions can take these three forms:

When you drag a data point or Symbol on to a graphic in the Graphics Editor, an associated Symbol instance is placed on the graphic, and the Object Reference property of the Symbol instance is set to the source reference.

info

NOTE:
The Object Reference property can also be manually changed.

The Object Reference property automatically copies the value to and updates all star (*) substitutions. This resolves all Symbol expressions in the final object references. The references can be seen in the Value Simulator view.

 

Name and Default Value Substitutions

Substitution Examples

Substitution

Substitution Name

Substitution Default Value

{Offset}

Offset

(none)

{offset}

Offset

(none)

{Value Offset}

Value Offset

(none)

{Value Offset = }

Value Offset

(none)

{Value Offset =4}

Value Offset

4

{Value Offset =4}

Value Offset

4

{Value Offset }

Value Offset

(one space)

{a=b =6}

a

b=6

{obj=1} {obj}

obj

1

{obj=1} {obj=2}

obj

2

{}

*

(none)

{*}

*

(none)

{*Alarm}

*Alarm

(none)

Resolved and Unresolved Expressions

If a child element of a symbol instance is selected, the Evaluation Editor displays the original expression along with the resolved expression.

Substitutions in Evaluations

A Star substitution {*} connects a substitution with an object reference. For example, a data point.

There are two forms a star substitution can take:

If there are two star substitutions used in a Symbol, both are connected by the object reference.

For example, {*} and {*Name}.

 

Evaluations and Extended Star Substitutions

 

Substitutions Variants

Substitutions can take the following forms: {Name} or {Name=Default Value}, which then require an input that is evaluated and then executed. See the examples below:

 

 

The substitution key word {Direction} allows you to change the direction of the active Symbol Instance using the mouse. See example below.

Increments of 0...4 with a combination of the left mouse button pressed and single click of right mouse button. The default direction is given in the substitution {Direction=3}

Extended Substitutions and Generic Symbols

A generic Symbol is a concept that allows you to create one type of Symbol that can support an object that has 1, 2, or more properties with changing values. Depending on the object, the Symbol does not display the elements of the graphic that do not have a data point associated with them.

For example, you want to create one Symbol that you can associate with either a 1-stage pump or a 2-stage pump. In this case, a Symbol for the 2-stage pump is created.

This is done by extending the expression syntax with the use of the question mark “?” in the expression. For each property, you create, you add another:

<data pointRef> | <Value> (‘?’[<DefaultValue> | <Alternatedata pointRef>])*

The table below provides examples of using the “?” in an expression applied to a text element.

Generic Symbol Substitution Syntax Examples

Expression in a Text Element

Substitution if First Reference Exists

Substitution if First Reference does not Exist

System1:Test_AI_1_1

 

 

Value of System1:Test_AI_1_1

 

#ENG

System1:Test_AI_1_1?

Hides text element

System1:Test_AI_1_1 ? 3.14

3.14

System1:Test_AI_1_1?”True”

True

System1:Test_AI_1_1 ? False

False

System1:Test_AI_1_1 ?System1:Test_AI_1_2

Value of System1:Test_AI_1_2

System1:Test_AI_1_1? System1:Test_AI_1_2?-5.7

Value of System1:Test_AI_1_2, if it exists. If it doesn’t exist, -5.7

 

Notes on Extended Syntax