Compare(Value: IDimSelection): Boolean;
Value - selection with which the existing selection is compared.
The Compare method compares selection with the selection passed by the Value parameter.
This method returns True if the selections match, and False if otherwise.
Executing the example requires that the repository contains a dictionary with the Dim_1 identifier.
Sub Main;
Var
MB: IMetabase;
Dimen: IDimInstance;
Selection, Selection1: IDimSelection;
s: String;
Begin
MB:=MetabaseClass.Active;
Dimen:=MB.ItemById("Dim_1").Open(Null) As IDimInstance;
Selection:=Dimen.CreateSelection;
Selection1:=Dimen.CreateSelection;
Selection.SelectSiblings(11);
Selection1.SelectSiblings(56);
If Selection.Compare(Selection1) Then
s:="Yes";
Else
s:="No";
End If;
End Sub Main;
After executing the example the "s" variable shows Yes if Selection matches Selection1.
See also: