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

AF SDK Reference

AFObject.GetPath Method (AFObject)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFObject.GetPath Method (AFObject)
Returns the path to the object relative from another object.

Namespace:  OSIsoft.AF
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public string GetPath(
	AFObject relativeTo
)
Public Function GetPath ( 
	relativeTo As AFObject
) As String

Dim instance As AFObject
Dim relativeTo As AFObject
Dim returnValue As String

returnValue = instance.GetPath(relativeTo)
public:
String^ GetPath(
	AFObject^ relativeTo
)
member GetPath : 
        relativeTo : AFObject -> string 

Parameters

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


See Also

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