AFObject.FindObject Method (IList(AFPathToken), AFObject)
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Finds the object identified by the list of parsed path tokens relative from an optional object.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static AFObject FindObject( IList<AFPathToken> pathTokens, AFObject relativeFrom = null )
Public Shared Function FindObject ( pathTokens As IList(Of AFPathToken), Optional relativeFrom As AFObject = Nothing ) As AFObject Dim pathTokens As IList(Of AFPathToken) Dim relativeFrom As AFObject Dim returnValue As AFObject returnValue = AFObject.FindObject(pathTokens, relativeFrom)
public: static AFObject^ FindObject( IList<AFPathToken>^ pathTokens, AFObject^ relativeFrom = nullptr )
static member FindObject : pathTokens : IList<AFPathToken> * ?relativeFrom : AFObject (* Defaults: let _relativeFrom = defaultArg relativeFrom null *) -> AFObject
Parameters
- pathTokens
- Type: System.Collections.GenericIListAFPathToken
A list of path tokens string representing a pathname that is relative to the specified object, or a fully qualified path. The list of path tokens can be generated using the ParsePath(String, AFObject, Boolean, AFIdentity) method. See Path Syntax for more information. - relativeFrom (Optional)
- Type: OSIsoft.AFAFObject
Specifies the object that the path was retrieved from. The query date of this object will be used where applicable.
Return Value
Type: AFObjectReturns the object identified by the list of parsed path tokens relative from an optional object.
Remarks
A path to an object is created by the one of the AFObjectGetPath methods and can be restored from a string using this method. A path, such as "\\MySystem\MyDatabase\MyElement|Attribute1", can be used to reference any object derived from AFObject. See Path Syntax for a complete description of the path syntax.
| The ShowExcludedAttributes setting will determine if excluded attributes are returned when finding attributes by path. |