AFAnalysisRule.CollectInputs Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
This method is an optional method which allows the analysis rule to obtain the
input values necessary to start an analysis.
Namespace: OSIsoft.AF.Analysis
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public virtual bool CollectInputs()
Public Overridable Function CollectInputs As Boolean Dim instance As AFAnalysisRule Dim returnValue As Boolean returnValue = instance.CollectInputs()
public: virtual bool CollectInputs()
abstract CollectInputs : unit -> bool override CollectInputs : unit -> bool
Return Value
Type: BooleanReturns if the operation was successful. Any messages generated during the collection process will be output using AFTrace.
Remarks
This implementation of this method must call the
AFCase.AddInput(AFAttribute, AFValue) or
AFCase.AddInput(AFAttribute, object, UOM)
method to add the input values to the case. Normally, it should call one of the
AFAttribute.GetValue Overload methods
to retrieve the initial value using the case as the context. This method must be able
to handle and continue processing if the AFAttribute.GetValue method throws an exception.