IAutoCubeInstance.DeleteElementsData

Syntax

DeleteElementsData(Selection: IDimSelectionSet);

Parameters

Selection. Elements selection, the values of which should be deleted.

Description

The DeleteElementsData method deletes data in the elements, which selection is passed by the Selection parameter.

Fore Example

Executing the example requires an automatic cube with the AUTO_CUBE identifier. The cube contains two dimensions.

Add links to the Metabase, Cubes and Dimensions system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    CubeI: ICubeInstance;
    DimSS: IDimSelectionSet;
Begin
    MB := MetabaseClass.Active;
    CubeI := MB.ItemById(
"AUTO_CUBE").Open(NullAs ICubeInstance;
    DimSS := CubeI.Destinations.DefaultDestination.CreateDimSelectionSet;
    DimSS.Item(
1).SelectElement(1False);
    DimSS.Item(
0).SelectElement(0False);
    (CubeI 
As IAutoCubeInstance).DeleteElementsData(DimSS);
End Sub UserProc;

After executing the example in accordance with the obtained selection data from automatic cube is deleted.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Dimensions;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    CubeI: ICubeInstance;
    DimSS: IDimSelectionSet;
Begin
    MB := Self.Metabase;
    CubeI := MB.ItemById[
"AUTO_CUBE"].Open(NullAs ICubeInstance;
    DimSS := CubeI.Destinations.DefaultDestination.CreateDimSelectionSet();
    DimSS.Item[
1].SelectElement(1False);
    DimSS.Item[
0].SelectElement(0False);
    (CubeI 
As IAutoCubeInstance).DeleteElementsData(DimSS);
End Sub;

See also:

IAutoCubeInstance