Click or drag to resize
OSIsoft, LLC

AFObjectGetPath Method (AFEncodeType, AFObject)

Returns the path to the object relative from another object, using the name and/or id as specified by encodeType.

Namespace:  OSIsoft.AF
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 2.10.8.440
Syntax
public string GetPath(
	AFEncodeType encodeType,
	AFObject relativeTo
)

Parameters

encodeType
Type: OSIsoft.AFAFEncodeType
Specifies how the path to the object is encoded. See AFEncodeType for details.
relativeTo
Type: OSIsoft.AFAFObject
Specifies that the path should be relative to the specified object. Use this parameter and the path returned from one of the AFObjectFindObject methods to restore this object.

Return Value

Type: String
Returns the path to the object.
Remarks
A path to an object is created by this method and can be restored from a string using one of the AFObjectFindObject or AFObjectFindObjects methods. 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.
Version Information

AFSDK

Supported in: 2.10.5, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6, 2.5, 2.4
See Also
Enabling Operational Intelligence