Remove(Index: Variant): Boolean;
Index. Index of the attribute to be removed.
The Remove method removes custom attribute, index of which is passed by the Index parameter.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
CalDim: ICalendarDimension;
UserAttrs: ICalendarDimAttributes;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("CALENDAR_DIM").Edit;
CalDim := MObj As ICalendarDimension;
UserAttrs := CalDim.Attributes;
If UserAttrs.Count <> 0 Then
UserAttrs.Remove(0);
End If;
MObj.Save;
End Sub Main;
After executing the example the first custom attribute is removed from the dictionary.
See also: