IDimInstance.CreateSelection

Syntax

CreateSelection: IDimSelection;

Description

The CreateSelection method creates an object containing dictionary selection.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Dimen: IDimInstance;
    DimSelect: IDimSelection;
    i: Integer;
Begin
    MB:=MetabaseClass.Active;
    Dimen:=MB.ItemById("D_TO").Open(NullAs 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 UserProc;

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:

IDimInstance