Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFObject.FindObject Method (IList(AFPathToken), AFObject)

AFObject.FindObject Method (IList(AFPathToken), AFObject)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFObject.FindObject Method (IList(AFPathToken), AFObject)
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: AFObject
Returns 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.

Note Notes to Callers
The ShowExcludedAttributes setting will determine if excluded attributes are returned when finding attributes by path.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6

See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in