AFAttribute.GetPaths Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Get all the relative paths to this AFAttribute.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public string[] GetPaths( string relativePath = null )
Public Function GetPaths ( Optional relativePath As String = Nothing ) As String() Dim instance As AFAttribute Dim relativePath As String Dim returnValue As String() returnValue = instance.GetPaths(relativePath)
public: array<String^>^ GetPaths( String^ relativePath = nullptr )
member GetPaths : ?relativePath : string (* Defaults: let _relativePath = defaultArg relativePath null *) -> string[]
Parameters
- relativePath (Optional)
- 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 all the paths to the attribute relative to the database. A path of "\\Server1\Database2\RootElement" would return paths to the attribute relative to "RootElement". If , then all the full paths to the attribute will be returned.
Return Value
Type: StringReturns all the relative paths to this AFAttribute.
Remarks
This method will return all the paths to the AFAttribute where the GetPath Overload method will return the single primary path.
For attributes of an AFElement when connected to a 2015 (2.7) or later server, all the paths are returned in one bulk call from the server. For older servers or for attributes of an AFEventFrame, this method could be an expensive operation because the paths have to be computed in the client and could require at least one call to the server for each parent if they were not previously loaded.