AFAnalysisRule.CollectInputs Method
- Last UpdatedJan 12, 2026
- 2 minute read
- PI System
- AF SDK 3.2.0
- 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.2.0.7
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.