IStandardDimIndexAttributes.Add

Syntax

Add(Value: IStandardDimAttribute);

Parameters

Value. The dictionary attribute, that must be added to index.

Description

The Add method adds the dictionary attribute, that is passed by the Value parameter, to index.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Dim: IStandardDimension;

DimInds: IStandardDimIndexes;

DimIndex: IStandardDimIndex;

DimIndAttrs: IStandardDimIndexAttributes;

Begin

MB:=MetabaseClass.Active;

MObj:=MB.ItemById("TAB_DIM").Edit;

Dim:=MObj As IStandardDimension;

DimInds:=Dim.Indexes;

If DimInds.Count<>0 Then

DimIndex:=DimInds.Item(0);

DimIndAttrs:=DimIndex.Attributes;

DimIndAttrs.Add(Dim.Attributes.Item(Dim.Attributes.Count-1));

End If;

MObj.Save;

End Sub Main;

After executing the example the last dictionary attribute is added to the first dictionary attribute, if it exists. Table dictionary identifier: TAB_DIM.

See also:

IStandardDimIndexAttributes