SetAttributeValue(Attribute: IMetaAttribute; Value: IDimSelection);
Attribute. The attribute, by which selection must be set.
Value. Elements selection, which must be set by the Attribute attribute.
The SetAttributeValue method selects indicators by the Attribute attribute.
The attribute specified as value of the Attribute parameter can be obtained in the IMetaAttributesBreadcrumb.MetaAttributes collection. The attribute selection is returned by the IMetaAttributesBreadcrumb.GetAttributeValue method.
Executing the example requires a form, a button on this form and the MetaAttributesBreadcrumb component named MetaAttributesBreadcrumb1. The MetaAttributesBreadcrumb1 component displays data of the time series database containing the COUNTRY attribute.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Attrs: IMetaAttributes;
Attr: IMetaAttribute;
Sel: IDimSelection;
Begin
Attrs := MetaAttributesBreadcrumb1.MetaAttributes;
Attr := Attrs.FindById("COUNTRY");
Sel := MetaAttributesBreadcrumb1.GetAttributeValue(Attr);
Sel.DeselectAll;
Sel.SelectElement(0, False);
Sel.SelectElement(1, False);
Sel.SelectElement(2, False);
MetaAttributesBreadcrumb1.SetAttributeValue(Attr, Sel);
End Sub Button1OnClick;
After executing the example clicking the button changes element selection by the COUNTRY attribute. The first three elements are selected by this attribute.
See also: