IMatrixCoord.ElementId

Syntax

ElementId(Index: Integer): String;

Parameters

Index - index of a dimension.

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.

Sub Main;

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(Null) As 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 Main;

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