IMetaAttributeBreadcrumbItem.GetDimGroup

Syntax

GetDimGroup: IDimElementGroup;

Description

The GetDimGroup property returns the labeled group of the dictionary elements for this component.

Example

Executing the example requires a form with a button and the MetaAttributesBreadcrumb component named MetaAttributesBreadcrumb1. The MetaAttributesBreadcrumb component is linked to the time series database.

The MetaAttributesBreadcrumb component must contain the first element that refers to the dictionary containing a group of elements with the GROUP_TEST identifier. Click the button to start executing this example.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MetaItems: IBreadcrumbItems;
    Item: IMetaAttributeBreadcrumbItem;
    Group: IDimElementGroup;
    mb: IMetabase;
    Selection: IDimSelection;
    DictDescr: IMetabaseObjectDescriptor;
Begin
    MetaItems := MetaAttributesBreadcrumb1.Items;
    Item := MetaItems.Item(0As IMetaAttributeBreadcrumbItem;
    Group := Item.GetDimGroup;
    If Group = Null Then
        Selection := Item.GetSelection;
        Selection.DeselectAll;
        DictDescr := Item.MetaAttribute.ValuesObject;
        mb := MetabaseClass.Active;
        Group := mb.ItemByIdNamespace("GROUP_TEST",DictDescr.Key).Bind As IDimElementGroup;
        Selection.Group := Group;
        Item.SetSelection(Selection);
    End If;
End Sub Button1OnClick;

After executing the example the first element of the MetaAttributesBreadcrumb component contains selection that includes all the elements from the indicated group.

See also:

IMetaAttributeBreadcrumbItem