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

AF SDK Reference

AFAttribute.FindAttribute Method (AFBaseElement, Guid)

AFAttribute.FindAttribute Method (AFBaseElement, Guid)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFAttribute.FindAttribute Method (AFBaseElement, Guid)
Retrieves the AFAttribute with the specified unique identifier.

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

Syntax

public static AFAttribute FindAttribute(
	AFBaseElement element,
	Guid id
)
Public Shared Function FindAttribute ( 
	element As AFBaseElement,
	id As Guid
) As AFAttribute

Dim element As AFBaseElement
Dim id As Guid
Dim returnValue As AFAttribute

returnValue = AFAttribute.FindAttribute(element, 
	id)
public:
static AFAttribute^ FindAttribute(
	AFBaseElement^ element, 
	Guid id
)
static member FindAttribute : 
        element : AFBaseElement * 
        id : Guid -> AFAttribute 

Parameters

element
Type: OSIsoft.AF.AssetAFBaseElement
The AFBaseElement to search for the AFAttribute identified by the specified id parameter. This method will return attributes marked as IsHidden or IsExcluded.
id
Type: SystemGuid
The unique identifier of the desired AFAttribute or the unique identifier of the AFAttributeTemplate of the desired AFAttribute.

Return Value

Type: AFAttribute
Returns the AFAttribute identified by the id in the specified element.

Remarks

This method will find the AFAttribute with the specified id within the attribute hierarchy of the specified element. The specified id can be the unique identifier of the desired AFAttribute or the unique identifier of the AFAttributeTemplate of the desired AFAttribute.

Version Information

AFSDK


See Also

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