ICubeLoaderMapItem.Method

Syntax

Method: CubeLoaderMapMethod;

Description

The Method property determines the method of the connection between dimensions.

Example

Executing the example requires a cube loader with the Cube_Load identifier. Source cube and consumer cube are installed in the loader.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

CubLoad: ICubeLoader;

DimsSource: ICubeModelDimensions;

Dim, Dim1: IDimensionModel;

MapInfo: ICubeLoaderMapInfo;

MapItem: ICubeLoaderMapItem;

i: Integer;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("Cube_Load").Edit;

CubLoad := MObj As ICubeLoader;

DimsSource := CubLoad.Source.Dimensions;

MapInfo := CubLoad.MapInfo;

For i := 0 To MapInfo.Count - 1 Do

MapItem := MapInfo.Item(i);

Dim := MapItem.Dimension;

Dim1 := DimsSource.FindById((Dim As IMetabaseObject).Id);

If Dim1 <> Null Then

MapItem.MapDimension := Dim1;

MapItem.MapIndex := Dim1.Indexes.PrimaryIndex;

MapItem.DimIndex := Dim.Indexes.PrimaryIndex;

MapItem.Method := CubeLoaderMapMethod.ByIndex;

End If;

End For;

MObj.Save;

End Sub Main;

After executing the example connection between dimensions of the consumer cube and dimensions of the source cube is set. The consumer dimension is searched in the source dimension list, if the search is successful, connection by index is set.

See also:

ICubeLoaderMapItem