ImageIndex: IDimAttribute;
The ImageIndex property returns dictionary attribute that is used as element icon.
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.
Executing the example requires the MDM repository named MDM that contains an MDM dictionary with the Dict_1 identifier.
Sub UserProc;
Var
MB: IMetabase;
Dict : IRdsDictionary;
Dim : IDimensionModel;
Att : IDimAttributes;
Begin
MB := MetabaseClass.Active;
Dict := MB.ItemByIdNamespace("Dict_1", MB.ItemById("RDS").Key).Edit As IRdsDictionary;
Dim := Dict As IDimensionModel;
Att := Dim.Attributes;
Att.ImageIndex := Att.FindById("Image");
(Dict As IMetabaseObject).Save;
End Sub UserProc;
After executing the example attribute with the Image identifier is used as element icon.
See also: