AFAttribute.FindAttribute Method (AFBaseElement, AFAttributeTemplate)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Retrieves the AFAttribute object created from the specified
AFAttributeTemplate.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static AFAttribute FindAttribute( AFBaseElement element, AFAttributeTemplate template )
Public Shared Function FindAttribute ( element As AFBaseElement, template As AFAttributeTemplate ) As AFAttribute Dim element As AFBaseElement Dim template As AFAttributeTemplate Dim returnValue As AFAttribute returnValue = AFAttribute.FindAttribute(element, template)
public: static AFAttribute^ FindAttribute( AFBaseElement^ element, AFAttributeTemplate^ template )
static member FindAttribute : element : AFBaseElement * template : AFAttributeTemplate -> AFAttribute
Parameters
- element
- Type: OSIsoft.AF.AssetAFBaseElement
The AFBaseElement to search for the AFAttribute identified by the specified template parameter. - template
- Type: OSIsoft.AF.AssetAFAttributeTemplate
The AFAttributeTemplate of the AFAttribute to search for in the specified element.
Return Value
Type: AFAttributeReturns the AFAttribute identified by the template in the specified element.
Remarks
The AFAttribute of the specified element
created from the specified AFAttributeTemplate is returned.
This method will return attributes marked as IsHidden or IsExcluded.