AFAttributeTemplate.FindAttributeTemplates Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Finds a list of AFAttributeTemplate objects identified by the path, relative from the specified object.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static IList<AFAttributeTemplate> FindAttributeTemplates( string path, AFObject relativeFrom )
Public Shared Function FindAttributeTemplates ( path As String, relativeFrom As AFObject ) As IList(Of AFAttributeTemplate) Dim path As String Dim relativeFrom As AFObject Dim returnValue As IList(Of AFAttributeTemplate) returnValue = AFAttributeTemplate.FindAttributeTemplates(path, relativeFrom)
public: static IList<AFAttributeTemplate^>^ FindAttributeTemplates( String^ path, AFObject^ relativeFrom )
static member FindAttributeTemplates : path : string * relativeFrom : AFObject -> IList<AFAttributeTemplate>
Parameters
- path
- Type: SystemString
A string containing a pathname that is relative to the specified AFAttributeTemplate, or a fully qualified path. See Path Syntax for more information. - relativeFrom
- Type: OSIsoft.AFAFObject
Specifies the object that the path was retrieved from. The query date of this object will be used where applicable. If this parameter is an AFElementTemplate and a relative path is specified, then the BaseTemplate is also searched.
Return Value
Type: IListAFAttributeTemplateReturns a list of AFAttributeTemplate objects identified by the path, relative from the specified object.
Remarks
A path to the AFAttributeTemplate can be obtained by calling one of the GetPath Overload methods.
This method is similar to the FindObject(String) method, but will only return an AFAttributeTemplate. When the path only indicates a path to an element template, this routine will return the DefaultAttribute of that element template (or its base template).
Note that unlike the AFAttributeTemplates collection of an AFElementTemplate, this routine will find attribute templates that are defined in base ElementTemplate(s) of the specified relativeFrom parameter.
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
See Also
Reference
AFAttributeTemplateFindAttributeTemplates(String, AFObject)