AFCase.GetLayers Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
This method returns a collection of AFLayer objects for the
specified element representing all the active layers of the case which contain
the element.
Namespace: OSIsoft.AF.Analysis
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 AFCase 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 the collection of layers for the specified 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.