IUserDimAttributes.ImageIndex

Syntax

ImageIndex: IUserDimAttribute;

Description

The ImageIndex property determines calculated dictionary's attribute, which function is Element Icon.

Comments

This property is relevant if the repository is linked to a document containing  dictionary element icons. If this attribute is set, an image is displayed next to element names. Image index matches the value of this attribute.

Only an integer dictionary attribute can be used as value of this property.

Example

Executing the example requires a calculated dictionary with the USER_DIM identifier.

Sub UserProc;
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.Integer;
    UsDimAttr.Id := "ImagesAttr";
    UsDimAttr.Name := "Attribute for icons";
    UsDimAts.ImageIndex := UsDimAttr;
    MObj.Save;
End Sub UserProc;

After executing the example the dictionary contains a new attribute functioning as Element Icon.

See also:

IUserDimAttributes | Default Dictionary Element Icons