Add([AddEmpty: Boolean = false]): IStandardCubeDestination;
AddEmpty. It determines a method for adding a cube display version.
The Add method adds a new cube display version.
Available values of the AddEmpty parameter:
True. A new display version is added.
False. Default value. The default display version copy is added.
Executing the example requires that the repository contains a standard cube with the STD_CUBE identifier.
Add links to the Cubes and Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
StdCube: IStandardCube;
Dest: IStandardCubeDestination;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get standard cube
MObj := MB.ItemById("STD_CUBE").Edit;
StdCube := MObj As IStandardCube;
// Add a new cube display version
Dest := StdCube.Destinations.Add;
// Set name and identifier of display version
Dest.Name := "Display version 1";
Dest.Id := "DESTINATION";
// Save changes
MObj.Save;
End Sub UserProc;
After executing the example the default display version copy is added to the cube.
See also: