DeleteElementsData(Selection: IDimSelectionSet);
Selection. Elements selection, the values of which should be deleted.
The DeleteElementsData method deletes data in the elements, which selection is passed by the Selection parameter.
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(Null) As ICubeInstance;
DimSS := CubeI.Destinations.DefaultDestination.CreateDimSelectionSet;
DimSS.Item(1).SelectElement(1, False);
DimSS.Item(0).SelectElement(0, False);
(CubeI As IAutoCubeInstance).DeleteElementsData(DimSS);
End Sub UserProc;
After executing the example in accordance with the obtained selection data from automatic cube is deleted.
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(Null) As ICubeInstance;
DimSS := CubeI.Destinations.DefaultDestination.CreateDimSelectionSet();
DimSS.Item[1].SelectElement(1, False);
DimSS.Item[0].SelectElement(0, False);
(CubeI As IAutoCubeInstance).DeleteElementsData(DimSS);
End Sub;
See also: