Show contents 

Dimensions > Dimensions Assembly Interfaces > IDimSelectionSet > IDimSelectionSet.Compare

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 UserProc;
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(NullAs ICubeInstance;
    Destination := CubeInstance.Destinations.DefaultDestination;
    DimSS := Destination.CreateDimSelectionSet;
    CubeInstance1 := MB.ItemById("CUBE_2").Open(NullAs 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 UserProc;

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