IDimSelectionSet.Compare

Syntax

Compare(Value: IDimSelectionSet): Boolean;

Parameters

Value. Cube selection with which the existing selection is compared.

Description

The Compare method compares current selection with the selection passed in the Value parameter.

Example

Sub Main;

Var

MB: IMetabase;

CubeInstance, CubeInstance1: ICubeInstance;

Destination, Destination1: ICubeInstanceDestination;

DimSS, DimSS1: IDimSelectionSet;

s: String;

i: Integer;

Begin

MB := MetabaseClass.Active;

CubeInstance := MB.ItemById("CUBE_1").Open(Null) As ICubeInstance;

Destination := CubeInstance.Destinations.DefaultDestination;

DimSS := Destination.CreateDimSelectionSet;

CubeInstance1 := MB.ItemById("CUBE_2").Open(Null) As ICubeInstance;

Destination1 := CubeInstance.Destinations.DefaultDestination;

DimSS1 := Destination.CreateDimSelectionSet;

For i := 0 To DimSS.Count - 1 Do

DimSS.Item(i).SelectAll;

End For;

For i := 0 To DimSS1.Count - 1 Do

DimSS1.Item(i).SelectAll;

End For;

If DimSS.Compare(DimSS1) Then

s := Identical;

Else

s := Not identical;

End If;

End Sub Main;

After executing the example the "s" variable contains Identical if the selections of the cube with the CUBE_1 identifier and the cube with the CUBE_2 identifier are identical.

See also:

IDimSelectionSet