IVirtualCubeSource.Cube

Syntax

Cube: ICubeModelDestination;

Description

The Cube property determines the cube, which is a data source for the virtual cube.

Example

Executing the example requires that the repository contains a virtual cube with the VIRT_CUBE identifier and a cube with the SourceCube_1 identifier.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

VirtCub: IVirtualCube;

Cub: ICubeModel;

Sources: IVirtualCubeSources;

Source: IVirtualCubeSource;

i: Integer;

Begin

MB := MetabaseClass.Active;

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

Cub := MB.ItemById("SourceCube_1").Bind As ICubeModel;

VirtCub := MObj As IVirtualCube;

Sources := VirtCub.Sources;

Source := VirtCub.Sources.Add(Cub.Destinations.DefaultDestination);

For i := 0 To Source.FixInfo.Count - 1 Do

Source.FixInfo.Item(i).Fixed := True;

Source.FixInfo.Item(i).Selection.SelectElement(0, False);

End For;

MObj.Save;

End Sub Main;

After executing the example the cube with the SourceCube_1 identifier is added to data sources of the Virt_Cube virtual cube. All dimensions of the source cube are fixed.

See also:

IVirtualCubeSource