Cube: ICubeModelDestination;
The Cube property determines the cube, which is a data source for the virtual cube.
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 UserProc;
Var
MB: IMetabase;
VirtCube: IVirtualCube;
Cube: ICubeModel;
Sources: IVirtualCubeSources;
Source: IVirtualCubeSource;
i: Integer;
Begin
MB := MetabaseClass.Active;
VirtCube := MB.ItemById("Virt_Cube").Edit As IVirtualCube;
Cube := MB.ItemById("SourceCube_1").Bind As ICubeModel;
Sources := VirtCube.Sources;
Source := VirtCube.Sources.Add(Cube.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;
(VirtCube As IMetabaseObject).Save;
End Sub UserProc;
After executing the example another cube is added to data sources of virtual cube. All dimensions of the source cube are fixed.
See also: