AFAnalysisService.QueueCalculation Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
This method queues analyses for calculation on PI Analysis Service for the given time range and mode.
Namespace: OSIsoft.AF.Analysis
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public Object QueueCalculation( IEnumerable<AFAnalysis> analyses, AFTimeRange timeRange, AFAnalysisServiceCalculationMode mode )
Public Function QueueCalculation ( analyses As IEnumerable(Of AFAnalysis), timeRange As AFTimeRange, mode As AFAnalysisServiceCalculationMode ) As Object Dim instance As AFAnalysisService Dim analyses As IEnumerable(Of AFAnalysis) Dim timeRange As AFTimeRange Dim mode As AFAnalysisServiceCalculationMode Dim returnValue As Object returnValue = instance.QueueCalculation(analyses, timeRange, mode)
public: Object^ QueueCalculation( IEnumerable<AFAnalysis^>^ analyses, AFTimeRange timeRange, AFAnalysisServiceCalculationMode mode )
member QueueCalculation : analyses : IEnumerable<AFAnalysis> * timeRange : AFTimeRange * mode : AFAnalysisServiceCalculationMode -> Object
Parameters
- analyses
- Type: System.Collections.GenericIEnumerableAFAnalysis
Analyses to queue for calculation. Cannot be null nor empty. - timeRange
- Type: OSIsoft.AF.TimeAFTimeRange
Time range to calculate. - mode
- Type: OSIsoft.AF.AnalysisAFAnalysisServiceCalculationMode
Calculation mode to specify what to do with the existing data.
Return Value
Type: ObjectA handle to the queued calculations.
Exceptions
| Exception | Condition |
|---|---|
| InvalidOperationException | This exception is thrown when connection to the analysis service fails for any reason. |
| ArgumentNullException | This exception is thrown when analyses is null. |
| ArgumentException | This exception is thrown when the start time of timeRange is after its end time. |
Remarks
This method queues the list of analyses on the analysis service to be calculated. The operation is asynchronous and returning of the method does not indicate that queued analyses were calculated.
| You must have Execute security rights to queue a calculation. |