AFPathToken.ParsePath Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Parses the specified path to an object into path tokens.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static IList<AFPathToken> ParsePath( string path, AFObject relativeFrom = null, bool allowDynamic = false, AFIdentity preferredIdentity = AFIdentity.Attribute )
Public Shared Function ParsePath ( path As String, Optional relativeFrom As AFObject = Nothing, Optional allowDynamic As Boolean = false, Optional preferredIdentity As AFIdentity = AFIdentity.Attribute ) As IList(Of AFPathToken) Dim path As String Dim relativeFrom As AFObject Dim allowDynamic As Boolean Dim preferredIdentity As AFIdentity Dim returnValue As IList(Of AFPathToken) returnValue = AFPathToken.ParsePath(path, relativeFrom, allowDynamic, preferredIdentity)
public: static IList<AFPathToken>^ ParsePath( String^ path, AFObject^ relativeFrom = nullptr, bool allowDynamic = false, AFIdentity preferredIdentity = AFIdentity::Attribute )
static member ParsePath : path : string * ?relativeFrom : AFObject * ?allowDynamic : bool * ?preferredIdentity : AFIdentity (* Defaults: let _relativeFrom = defaultArg relativeFrom null let _allowDynamic = defaultArg allowDynamic false let _preferredIdentity = defaultArg preferredIdentity AFIdentity.Attribute *) -> IList<AFPathToken>
Parameters
- path
- Type: SystemString
A string containing a pathname that is relative to the specified object, or a fully qualified path. See Path Syntax for more information. - relativeFrom (Optional)
- Type: OSIsoft.AFAFObject
The relative object associated with the specified path. This object will not be used if the full path is specified. - allowDynamic (Optional)
- Type: SystemBoolean
Specify to check for dynamic PIPoint path or to not generate an error if the format of the path looks like it could be a dynamic attribute. - preferredIdentity (Optional)
- Type: OSIsoft.AFAFIdentity
The identity of the preferred object to be found by the path. The default is Attribute. You should specify PIPoint if the path represents a path to a PIPoint.
Return Value
Type: IListAFPathTokenReturns a list of path tokens representing the parts of the parsed path.