AFCase.IsActiveElement Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Determines if the specified AFElement is active
within the case.
Namespace: OSIsoft.AF.Analysis
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public bool IsActiveElement( AFElement element )
Public Function IsActiveElement ( element As AFElement ) As Boolean Dim instance As AFCase Dim element As AFElement Dim returnValue As Boolean returnValue = instance.IsActiveElement(element)
public: bool IsActiveElement( AFElement^ element )
member IsActiveElement : element : AFElement -> bool
Parameters
- element
- Type: OSIsoft.AF.AssetAFElement
The AFElement to check if it is active within the case.
Return Value
Type: BooleanReturns if the specified element is active within the case.
Remarks
This method is to be used with an AFAnalysis with an AFModel as its Target. The AFAnalysisRule.CollectElements method uses this method to determine which elements are active for the case and should be included in the Elements collection.
This method determines that an AFElement is active if the AFModel which is the target of the analysis contains the element in its Elements collection. It also must be on an active AFLayer of the case. If the element is not on any layers, then it is always active.