IAlgorithmCalculationResult.ChangedPoints

Syntax

ChangedPoints: IAlgorithmChangedPointResults;

Description

The ChangedPoints property returns information about the number of data consumer cells, changed on calculating calculation blocks.

Comments

The property is used for easier check of algorithm calculation results.

Example

Executing the example requires that the repository contains a calculation algorithm with the ALGORITHM identifier. The calculation algorithm should contain configured objects.

Add links to the Algo and Metabase system assemblies. Add links to the assemblies required for working with calculation algorithms.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObjectDescriptor;
    Algo: ICalcObject;
    CalcAlgo: ICalcAlgorithm;
    CalcResult: IAlgorithmCalculationResult;
    PointResults: IAlgorithmChangedPointResults;
    PointResult: IAlgorithmChangedPointResult;
    i: Integer;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get calculation algorithm
    MObj := MB.ItemById("ALGORITHM");
    Algo := CalcObjectFactory.CreateCalcObject(MObj, True);
    CalcAlgo := Algo As ICalcAlgorithm;
    // Calculate algorithm
    CalcResult := CalcAlgo.Calculate;
    // Get information about the number of changed data cells
    PointResults := CalcResult.ChangedPoints;
    // Display the number of calculation blocks in the console
    Debug.WriteLine("Number of calculation blocks: " + PointResults.Count.ToString);
    // Display information about each calculation algorithm object in the console
    For i := 0 To PointResults.Count - 1 Do
        // Select calculation algorithm object
        PointResult := PointResults.Item(i);
        // Display calculation block name
        Debug.WriteLine("Calculation block name: " + PointResult.Name);
        // Display calculation block identifier
        Debug.WriteLine("Calculation block identifier: " + PointResult.Id);
        // Display calculation block key
        Debug.WriteLine("Calculation block key: " + PointResult.Key.ToString);
        // Display the number of data cells changed on calculation block execution
        Debug.WriteLine("Number of changed data cells: " + PointResult.ChangedPointsCount.ToString);  
    End For;
End Sub UserProc;

After executing the example, calculation blocks will be calculated. The console will display the calculation result with information about the number of changed cells in th data consumer, for example:

Number of calculation blocks: 1

Calculation block name: Calculation block

Calculation block identifier: CALC

Calculation block key: 299979

Number of changed data cells: 23

See also:

IAlgorithmCalculationResult