IMatrixCoord.ElementId

Syntax

ElementId(Index: Integer): String;

Parameters

Index. Dimension index.

Description

The ElementId property determines element identifier by the specified dimension with corresponding matrix coordinate.

Example

Executing the example requires a cube with the CUBE_1 identifier that contains two dimensions. There are elements with numeric identifiers in the first dimension, the second dimension is a calendar one containing the Months level.

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

Sub UserProc;
Var
    MB: IMetabase;
    CubeInst: ICubeInstance;
    MatrDS: IMatrixDataSource;
    DimSS: IDimSelectionSet;
    Matr: IMatrix;
    Coord: IMatrixCoord;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    CubeInst := MB.ItemById("CUBE_1").Open(NullAs ICubeInstance;
    MatrDS := CubeInst.Destinations.DefaultDestination As IMatrixDataSource;
    DimSS := MatrDS.CreateDimSelectionSet;
    DimSS.Item(0).SelectAll;
    DimSS.Item(1).SelectAll;
    Matr := MatrDS.Execute(DimSS);
    Coord := Matr.CreateCoord;
    Coord.ElementId(0) := "3";
    Coord.ElementId(1) := "MONTHS:2.2002";
    Debug.WriteLine(Matr.Item(Coord));
End Sub UserProc;

After executing the example a data matrix is created on the basis of a cube. The value of the specified matrix element is displayed in the development environment console. The element is addressed through identifiers of corresponding dimensions elements.

See also:

IMatrixCoord