IMetaAttributesBreadcrumb.SetAttributeValue

Fore Syntax

SetAttributeValue(Attribute: IMetaAttribute; Value: IDimSelection);

Fore.NET Syntax

SetAttributeValue(Attribute: Prognoz.Platform.Interop.Rds.IMetaAttribute; Value: Prognoz.Platform.Interop.DimensionsDimSelection);

Parameters

Attribute. The attribute by which the user should set selection.

Value. Elements selection which must be set by the Attribute attribute.

Description

The SetAttributeValue method selects factors by the Attribute attribute.

Comments

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.

Fore Example

Executing this 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(0False);
    Sel.SelectElement(1False);
    Sel.SelectElement(2False);
    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.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Rds;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Attrs: IMetaAttributes;
    Attr: IMetaAttribute;
    Sel: IDimSelection;
Begin
    Attrs := MetaAttributesBreadcrumbNet1.MetaAttributes;
    Attr := Attrs.FindById("COUNTRY");
    Sel := MetaAttributesBreadcrumbNet1.CtrlBox.GetAttributeValue(Attr);
    Sel.DeselectAll();
    Sel.SelectElement(0False);
    Sel.SelectElement(1False);
    Sel.SelectElement(2False);
    MetaAttributesBreadcrumbNet1.CtrlBox.SetAttributeValue(Attr, Sel);
End Sub;

See also:

IMetaAttributesBreadcrumb