IAutoCubeDestinations.RemoveByKey

Syntax

RemoveByKey(Key: Integer): Boolean;

Parameters

Key. Key of display version that must be removed.

Description

The RemoveByKey method removes display version of automatic cube, which key is passed by the Key parameter.

Example

Executing the example requires that the repository contains an automatic cube with the AUTOCUBE identifier.

Add links to the Cubes and Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    AutoCub: IAutoCube;
    Dests: IAutoCubeDestinations;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("AUTOCUBE").Edit;
    AutoCub := MObj As IAutoCube;
    Dests := AutoCub.Destinations;
    Dests.RemoveByKey(Dests.Item(Dests.Count - 1).Key);
    MObj.Save;
End Sub UserProc;

After executing the example the last display version is deleted from the automatic cube.

See also:

IAutoCubeDestinations