IUserDimIndexes.Add

Syntax

Add: IUserDimIndex;

Description

The Add method adds an index to calculated dictionary.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

UsDim: IUserDimension;

UsDimInds: IUserDimIndexes;

UsDimIndex: IUserDimIndex;

Begin

MB:=MetabaseClass.Active;

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

UsDim:=MObj As IUserDimension;

UsDimInds:=UsDim.Indexes;

UsDimIndex:=UsDimInds.Add;

UsDimIndex.Name:=ID index;

UsDimIndex.Id:="Index_Id";

UsDimIndex.Attributes.Add(UsDim.Attributes.Id);

MObj.Save;

End Sub Main;

After executing the example the calculated dictionary contains attribute index functioning as ID. Calculated dictionary identifier: USER_DIM.

See also:

IUserDimIndexes