AFModel.GetLayers Method
- Last UpdatedJan 12, 2026
- 2 minute read
- PI System
- AF SDK 3.2.0
- Developer
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.2.0.7
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: AFNamedCollectionListAFLayerReturns 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.