Show contents 

Dimensions > Dimensions Assembly Interfaces > IUserDimLevels > IUserDimLevels.Remove

IUserDimLevels.Remove

Syntax

Remove(Index: Variant): Boolean;

Parameters

Index. Level index.

Description

The Remove method removes the level and returns True if it is successfully removed. Level index is passed by the Index parameter.

Example

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    UsDim: IUserDimension;
    UsDimLevs: IUserDimLevels;
    s: String;
Begin
    MB:=MetabaseClass.Active;
    MObj:=MB.ItemById("USER_DIM").Edit;
    UsDim:=MObj As IUserDimension;
    UsDimLevs:=UsDim.Levels;
    If UsDimLevs.Remove(UsDimLevs.Count-1Then
        s:="Removed";
    Else
        s:="Not removed";
    End If;
    MObj.Save;
End Sub UserProc;

After executing the example the "s" variable contains Removed if the last dictionary level is successfully removed. Calculated dictionary identifier - USER_DIM.

See also:

IUserDimLevels