IMsMethodCalculation.CurrentPoint

Syntax

CurrentPoint: DateTime;

Description

The CurrentPoint property determines the point, where the method calculation is executed. This property is used in the model calculation based on the user calculation method.

Example

Public Class My_Method: Object, IMsUserTransformImplementation
    Matr: IMatrix;
    Mcoo: IMatrixCoord;
    Cub: ICubeInstance;
    Sub Execute(Calculation: IMsMethodCalculation; Coo: IMsFormulaTransformCoord; Explained: IMsFormulaTerm; Explanatories: IMsFormulaTermList);
    Var
        i: Integer;
    Begin
        Matr := Calculation.Variable(Explained.Slice.Variable.VariableStub);
        Mcoo := Matr.CreateCoord;
        Matr.ValueFlag := Matr.ValueFlag + 1;
        For i := 0 To Calculation.Period.ForecastEndDate.Year - Calculation.Period.IdentificationStartDate.Year Do
            MCoo.Item(0) := i;
            MCoo.Item(1) := 1;
            Matr.Item(Mcoo) := Calculation.CurrentPoint.Year;
            Calculation.CurrentPoint := DateTime.AddYears(Calculation.CurrentPoint, 1);
        End For;
        Cub := ((Explained.Slice.Variable.VariableStub As IMsVariable).Cube As IMetabaseObject).Open(NullAs ICubeInstance;
        Cub.Destinations.DefaultDestination.CreateStorage.SaveMatrix(Matr, Matr.ValueFlag);
    End Sub Execute;
End Class My_Method;

This example is a macro that contains a custom method of model calculation. At model calculation that has been adjusted to use the custom method, on the first script dimension the values of year in a point of calculation are recorded.

See also:

IMsMethodCalculation|IMsUserTransform|IMsUserTransform.Assembly|IMsUserTransform.ClassName