Relative path syntax
- Last UpdatedJun 02, 2025
- 1 minute read
- PI System
- PI Server 2018
- PI Server
You can use relative path syntax to navigate the Elements hierarchy and obtain other attribute values. In relative path syntax, the following syntax is used:
-
A double period (..) indicates the parent object: ..\Element2|Attribute1
-
A single period (.) represents the current object, and is used to create a relative path from the current object
-
A single period followed by a vertical bar (.|) references a child PI AF attribute: .|Attribute1|Attribute2
-
When the current object is a PI AF element, a relative path is created from the database, for example: \Element1\Element2|Attribute1
Examples of relative path syntax
For example, suppose you have the following element hierarchy:
In an event frame that has Production Line 1 as the primary referenced element, you can obtain the value of the Price attribute that is assigned to the Unit 1 parent element with the following syntax:
.\Elements[.]\..\|Price
If the Price attribute were two levels up the hierarchy, you would use:
.\Elements[.]\..\..|Price
You can obtain the value of the Inflow PI point attribute that is assigned to the Pump 1 child element with the following syntax:
.\Elements[.]\Pump 1|Inflow
If the Pump 1 child element were based on the Pump element template, you would use:
.\Elements[.]\[@Template=Pump]|Flow