Cube: ICubeModelDestination;
The Cube property determines a source cube for a cube view.
Executing the example requires that the repository contains a cube view with the VIEW_CUBE identifier and a cube with the SourceCube_1 identifier.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Cub: ICubeModel;
ViewCub: ICubeView;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("VIEW_CUBE").Edit;
Cub := MB.ItemById("SourceCube_1").Bind As ICubeModel;
ViewCub := MObj As ICubeView;
ViewCub.Cube := Cub.Destinations.DefaultDestination;
MObj.Save;
End Sub Main;
After executing the example a cube with the SourceCube_1 identifier is set as a source cube for a cube view.
See also: