Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFAnalysisService.QueueCalculation Method

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFAnalysisService.QueueCalculation Method
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: Object
A handle to the queued calculations.

Exceptions

ExceptionCondition
InvalidOperationExceptionThis exception is thrown when connection to the analysis service fails for any reason.
ArgumentNullExceptionThis exception is thrown when analyses is null.
ArgumentExceptionThis 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.

Security note Security Note
You must have Execute security rights to queue a calculation.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5

See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in