GetSelection: IDimSelection;
The GetSelection method returns the selection of time series that is set for the attribute, which this element corresponds to.
Executing the example requires a form, a button on this form and the MetaAttributesBreadcrumb component named MetaAttributesBreadcrumb1. The MetaAttributesBreadcrumb1 component is linked to the time series database.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Item: IMetaAttributeBreadcrumbItem;
Sel: IDimSelection;
Elems: IDimElements;
i: Integer;
Begin
Item := MetaAttributesBreadcrumb1.Items.Item(0) As IMetaAttributeBreadcrumbItem;
Sel := Item.GetSelection;
Elems := Sel.Dimension.Elements;
For i := 0 To Sel.SelectedCount - 1 Do
Debug.WriteLine(Elems.Name(Sel.Element(i)));
End For;
End Sub Button1OnClick;
After executing the example, on clicking the button the names of the elements, that are selected by the attribute, which the first element of the MetaAttributesBreadcrumb1 component corresponds to, are displayed in the environment development console.
See also: