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

AF SDK Reference

AFModel.GetLayers Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFModel.GetLayers Method
This method returns a collection of AFLayer objects for the specified element representing all the layers of the model which contain the element.

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

Syntax

public AFNamedCollectionList<AFLayer> GetLayers(
	AFElement element
)
Public Function GetLayers ( 
	element As AFElement
) As AFNamedCollectionList(Of AFLayer)

Dim instance As AFModel
Dim element As AFElement
Dim returnValue As AFNamedCollectionList(Of AFLayer)

returnValue = instance.GetLayers(element)
public:
AFNamedCollectionList<AFLayer^>^ GetLayers(
	AFElement^ element
)
member GetLayers : 
        element : AFElement -> AFNamedCollectionList<AFLayer> 

Parameters

element
Type: OSIsoft.AF.AssetAFElement
The element associated with the layers being returned.

Return Value

Type: AFNamedCollectionListAFLayer
Returns a collection of AFLayer objects for the specified element representing all the layers of the model which contain the element.

Remarks

This is a subset of the collection returned by the Layers property. A layer is considered to contain the element if it is in the collection itself or if an AFElement that directly owns the element through the Parent property is in the collection.

Version Information

AFSDK


See Also

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