IStandardDimAttributes.RemoveByKey

Syntax

RemoveByKey(AttributeKey: Integer): Boolean;

Parameters

AttributeKey. Attribute key.

Description

The RemoveByKey method removes attribute, key of which is passed by the AttributeKey parameter.

Example

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dimens: IStandardDimension;
    DimAtrrs: IStandardDimAttributes;
    s: String;
Begin
    MB:=MetabaseClass.Active;
    MObj:=MB.ItemById("TAB_DIM").Edit;
    Dimens:=MObj As IStandardDimension;
    DimAtrrs:=Dimens.Attributes;
    If DimAtrrs.RemoveByKey(4796Then
        s:="Removed";
    Else
        s:="Not removed";
    End If;
    MObj.Save;
End Sub UserProc;

After executing the example the "s" variable contains Removed, if the table dictionary attribute with 4796 key is successfully removed. Table dictionary identifier: TAB_DIM.

See also:

IStandardDimAttributes