Add(Source: ICubeModelDestination): ICalculatedCubeSource;
Source. The cube that should be added to data sources of calculated cube.
The Add method adds a data source to a calculated cube.
Executing the example requires that the repository contains a calculated cube with the Calc_Cube identifier and a cube with the Cube_1 identifier, which will be added to data sources of calculated cube.
Sub UserProc;
Var
MB: IMetabase;
Cube: ICalculatedCube;
Sources: ICalculatedCubeSources;
CubeSource: ICubeModel;
Begin
MB := MetabaseClass.Active;
Cube := MB.ItemById("Calc_Cube").Edit As ICalculatedCube;
CubeSource := MB.ItemById("Cube_1").Bind As ICubeModel;
Sources := Cube.Sources;
Sources.Add(CubeSource.Destinations.DefaultDestination);
(Cube As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the specified cube is added to data sources of calculated cube.
See also: