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