IAutoCubeInstance.CopyElementsData

Syntax

CopyElementsData(Selection: IDimSelectionSet; DimKey: Integer; Element: Integer);

Parameters

Selection - dimension elements selection, in which data must be copied.

DimKey - dimension key, by which copying is executed.

Element - dimension element, which data must be copied by all the elements selected in Selection.

Description

The CopyElementsData method copies automatic cube data according to the specified parameters.

Example

Executing the example requires an automatic cube with the AUTO_CUBE identifier. The cube contains a dimension with the Dim_1 identifier, by which copying is executed.

Sub Main;

Var

MB: IMetabase;

CubeI: ICubeInstance;

DimSS: IDimSelectionSet;

DimS: IDimSelection;

DimKey: Integer;

Begin

MB := MetabaseClass.Active;

CubeI := MB.ItemById("AUTO_CUBE").Open(Null) As ICubeInstance;

DimSS := CubeI.Destinations.DefaultDestination.CreateDimSelectionSet;

For Each Dims In DimSS Do

If Dims.Dimension.Ident = "Dim_1" Then

DimS.SelectElement(1, False);

DimS.SelectElement(2, False);

DimKey := Dims.Dimension.Key;

Else

DimS.SelectAll;

End If;

End For;

(CubeI As IAutoCubeInstance).CopyElementsData(DimSS, DimKey, 0);

End Sub Main;

After executing the example data is copied into the automatic cube. The copied data is located by the first element of the Dim_1 dimension. Copying is executed into the cells located by the second and third element of the Dim_1 dimension and all the elements of other dimensions.

See also:

IAutoCubeInstance