1. Pathnames

Some programs need to use pathnames for SDK objects. This section describes the syntax supported by the SDK for object pathnames.

The names of the objects in a pathname are separated by delimiters. The delimiters used by the SDK are the backslash (\) and the pipe character (|). Neither of these delimiters is a legal character for any SDK object name.

Persistence String

Because the names of objects can change, you should use the persistence string to save an object reference if possible. The persistence string can be used to retrieve many objects even if its name or the names of other objects in the pathname have changed.

If you use the pathname, the change of any name in the path makes the object irretrievable. In the case of PIModules, the pathname can be different at different QueryDates. This makes the use the pathname to retrieve modules very fragile.

  1. Server Name

The first part of the pathname is the name of the Server. It is preceded by two backslashes (\\) and followed by one.

\\servername\

The rest of the pathname follows the trailing backslash.

  1. PIPoint

There is a flat collection of PIPoints for each Server so the complete pathname for a PIPoint is:

\\servername\pointname

There is an SDK function to get the pathname of a PIPoint and use the pathname to retrieve that PIPoint.

  1. PIModule

PIModule's are in a hierarchy so the pathname for a PIModule includes all of the names of its parents:

\\servername\modulename\modulename\...\modulename

NOTE: A PIModule can have more than one parent and thus more than one pathname. No pathname is preferred by the database over any other one.

IMPORTANT: The pathname of a PIModule can be different at different times in history. This is one of the key features of the PI Module Database.

  1. PIAlias

PIAlias's are in a PIModule's PIAliases collection. Their pathname starts out with the pathname of the parent PIModule followed by a single pipe character (|) and then the alias name:

\\servername\modulename\modulename\...\modulename|aliasname

  1. PIHeadingSet

PIHeadingSet's are in a collection accessed from the PI Module Database on a Server. Their pathname starts out with the Server and is followed by the PIHeadingSet name:

\\servername\piheadingsetname

  1. PIHeadings

PIHeading's are in a collection below a particular PIHeadingSet. Their pathname starts out with the Server and is followed by the PIHeadingSet name and then their name:

\\servername\piheadingsetname\piheadingname

  1. PIProperty

PIProperty's are in a PIModule's PIPIProperty hierarchy. Their pathname starts out with the pathname of the parent PIModule followed by a double pipe character (||) and then the first property name. If the property is farther down the hierarchy, single pipe characters (|) are used as delimiters:

\\servername\modulename\...\modulename||propertyname

\\servername\modulename\...\modulename||propertyname|...|propertyname

  1. PIBatch

Because more than one PIBatch on a server can have the same BatchID, there is no unambiguous name that can be used to construct a pathname for a PIBatch. The persistence string for a PIBatch contains enough information to retrieve a specific PIBatch even if its BatchID changes.

PIBatch PIProperty's

Because the parent PIBatch doesn't have an unambiguous pathname, PIProperty's within a PIBatch don't have one either. You can use the same syntax used for PIModule PIProperty's to display the pathname of PIProperties within a PIBatch.

  1. PICampaign

Because more than one PICampaign on a server can have the same CampaignID, there is no unambiguous name that can be used to construct a pathname for a PICampaign. The persistence string for a PICampaign contains enough information to retrieve a specific PICampaign even if its CampaignID changes.

PICampaign PIProperty's

Because the parent PICampaign doesn't have an unambiguous pathname, PIProperty's within a PICampaign don't have one either. You can use the same syntax used for PIModule PIProperty's to display the pathname of PIProperties within a PICampaign.

  1. PITransferRecord

Because more than one PITransferRecord on a server can have the same attributes (other than UniqueID), there is no unambiguous name that can be used to construct a pathname for a PITransferRecord. The persistence string for a PITransferRecord contains enough information to retrieve a specific PITransferRecord even if its attributes change.

PITransferRecord PIProperty's

Because the parent PITransferRecord doesn't have an unambiguous pathname, PIProperty's within a PITransferRecord don't have one either. You can use the same syntax used for PIModule PIProperty's to display the pathname of PIProperties within a PITransferRecord.

  1. PIUnitBatch

Because more than one PIUnitBatch on a server can have the same BatchID, there is no unambiguous name that can be used to construct a pathname for a PIUnitBatch. The persistence string for a PIUnitBatch contains enough information to retrieve a specific PIUnitBatch even if its BatchID changes.

PIUnitBatch PISubBatch's

Because the parent PIUnitBatch doesn't have an unambiguous pathname, PISubBatch's within a PIUnitBatch don't have one either.

The syntax for the pathname of PISubBatch's is similar to that used for PIProperty's since both are hierarchical.

||subbatchname|subbatchname|...|subbatchname

Enabling Operational Intelligence