Add: IUserDimAttribute;
The Add method adds a calculated dictionary's attribute.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
UsDim: IUserDimension;
UsDimAts: IUserDimAttributes;
UsDimAttr: IUserDimAttribute;
Begin
MB:=MetabaseClass.Active;
MObj:=MB.ItemById("USER_DIM").Edit;
UsDim:=MObj As IUserDimension;
UsDimAts:=UsDim.Attributes;
UsDimAttr:=UsDimAts.Add;
UsDimAttr.DataType:=DbDataType.String;
UsDimAttr.Id:="New_Attr";
UsDimAttr.Name:=New attribute;
MObj.Save;
End Sub Main;
After executing the example a calculated dictionary contains a new attribute. Calculated dictionary identifier: USER_DIM.
See also: