IDimSelectionSet.EndUpdate

Fore Syntax

EndUpdate;

Fore.NET Syntax

EndUpdate();

Description

The EndUpdate method lifts prohibition from events execution.

Comments

After calling the method all events generated in between calling of the IDimSelectionSet.BeginUpdate and IDimSelectionSet.EndUpdate methods.

Fore Example

Executing the example requires that repository contains cube with the CUBE_SEP_PARAMS identifier.

Ad links to the Cubes, Dimensions, Matrix, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    cubeinst: ICubeInstance;
    matrix: Imatrix;
    matrixds: IMatrixDataSource;
    dimselectionset: IDimSelectionSet;
    coord: IMatrixCoord;
    i: integer;
Begin
    // Get repository
    mb := MetabaseClass.Active;
    // Get cube
    cubeinst := mb.ItemById("CUBE_SEP_PARAMS").Open(NullAs ICubeInstance;
    // Get target as matrix
    matrixds := CubeInst.Destinations.DefaultDestination As IMatrixDataSource;
    // Create set of selections for dimensions
    dimselectionset := matrixds.CreateDimSelectionSet;
    // Disable change
    dimselectionset.BeginUpdate;
    // Save selection collection in matrix
    matrix := matrixds.Execute(dimselectionset);
    // Create coordinate in matrix
    coord := matrix.CreateCoord;
    // Change value for all coordinate elements in dimension
    For i := 0 To matrix.DimensionCount - 1 Do
        coord.Item(i) := 0;
    End For;
    // Set new value for coordinate in matrix
    matrix.Item(Coord) := 10;
    // Save changes in matrix
    matrixds.SaveData(matrix);
    // Apply changes
    dimselectionset.EndUpdate;
End Sub UserProc;

After executing the example matrix will be obtained basing on the cube. For the matrix coordinate value will be changed, after it changed matrix will be saved to the cube.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Matrix;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    cubeinst: ICubeInstance;
    matrix: Imatrix;
    matrixds: IMatrixDataSource;
    dimselectionset: IDimSelectionSet;
    coord: IMatrixCoord;
    i: integer;
Begin
    // Get repository
    mb := Params.Metabase;
    // Get cube
    cubeinst := mb.ItemById["CUBE_SEP_PARAMS"].Open(NullAs ICubeInstance;
    // Get target as matrix
    matrixds := CubeInst.Destinations.DefaultDestination As IMatrixDataSource;
    // Create set of selections for dimensions
    dimselectionset := matrixds.CreateDimSelectionSet();
    // Disable change
    dimselectionset.BeginUpdate();
    // Save selection collection in matrix
    matrix := matrixds.Execute(dimselectionset);
    // Create coordinate in matrix
    coord := matrix.CreateCoord();
    // Change value for all coordinate elements in dimension
    For i := 0 To matrix.DimensionCount - 1 Do
        coord.Item[i] := 0;
    End For;
    // Set new value for coordinate in matrix
    matrix.Item[Coord] := 10;
    // Save changes in matrix
    matrixds.SaveData(matrix);
    // Apply changes
    dimselectionset.EndUpdate();
End Sub;

See also:

IDimSelectionSet