CreateSelection: IDimSelection;
The CreateSelection method creates an object containing dictionary selection.
Sub Main;
Var
MB: IMetabase;
Dimen: IDimInstance;
DimSelect: IDimSelection;
i: Integer;
Begin
MB:=MetabaseClass.Active;
Dimen:=MB.ItemById("D_TO").Open(Null) As IDimInstance;
DimSelect:=Dimen.CreateSelection;
For i:=0 To Dimen.Elements.Count-1 Step 5 Do
DimSelect.SelectElement(i,False);
End For;
i:=DimSelect.SelectedCount;
End Sub Main;
After executing the example dictionary selection is created, each fifth element is selected, and the "i" variable contains the number of selected elements.
See also: