AFElement.GetPath Method (String, IList(AFElement))
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Get a path to the child elements.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static IDictionary<Guid, string> GetPath( string relativePath, IList<AFElement> children )
Public Shared Function GetPath ( relativePath As String, children As IList(Of AFElement) ) As IDictionary(Of Guid, String) Dim relativePath As String Dim children As IList(Of AFElement) Dim returnValue As IDictionary(Of Guid, String) returnValue = AFElement.GetPath(relativePath, children)
public: static IDictionary<Guid, String^>^ GetPath( String^ relativePath, IList<AFElement^>^ children )
static member GetPath : relativePath : string * children : IList<AFElement> -> IDictionary<Guid, string>
Parameters
- relativePath
- Type: SystemString
The full path in ShortName format to the parent object that the returned paths should be relative. For example, "\\Server1\Database2" would return paths to each child element relative to the database. A path of "\\Server1\Database2\RootElement" would return paths to each child element relative to "RootElement". If , then full paths will be returned to each child element. - children
- Type: System.Collections.GenericIListAFElement
The list of child elements whose path should be returned.
Return Value
Type: IDictionaryGuid, StringReturns a path to each child element in the children list in a dictionary where the key is the ID of the child element and the value is the path to the child element.