IMetaAttributesTreeList.GetSelectedMembers

Fore Syntax

GetSelectedMembers(FactorsOnly: Boolean; AddDimChildren: Boolean; AddOnlyChild: Boolean): IMetaMembersSet;

Fore.NET Syntax

GetSelectedMembers(FactorsOnly: boolean; AddDimChildren: boolean; AddOnlyChild: boolean): Prognoz.Platform.Interop.Rds.MetaMembersSet;

Parameters

FactorsOnly. Indicates whether only selected factors are obtained. True - return only selected factors. False - return selected folders and factors.

AddDimChildren. Indicates whether child elements are added recursively. True - On selecting the folder add child elements to it. False - return only selected elements.

AddOnlyChild. Indicates whether only child elements are added and the source element is excluded. True - exclude the selected element (folder) and add only child elements. False - return only selected elements.

Description

The GetSelectedMembers method returns a set of elements selected in the component according to the specified selection criteria.

Comments

The AddDimChildren parameter is used in combination with the AddOnlyChild parameter. If the parameters are set to True, and some folders are selected in the component, the output method set will contain all child factors of these folders. In this case the folders are excluded from the output set.

Fore Example

Executing the example requires a form with the Button1 button, the MetaAttributesBreadcrumb component, and the MetaAttributesTreeList component named MetaAttributesTreeList1. These components are configured to work with any time series database.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MembersSet: IMetaMembersSet;
    Member: IMetaMember;
Begin
    MembersSet := MetaAttributesTreeList1.GetSelectedMembers(FalseTrueTrue);
    MembersSet.Reset;
    While Not MembersSet.Eof Do
        Member := MembersSet.Current;
        Debug.WriteLine(Member.Name);
        MembersSet.Next;
    End While;
End Sub Button1OnClick;

Clicking the button outputs the list of elements selected in the component to the development environment console. If the folders are selected, their child elements are included to the list. The folders are excluded from the list.

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.Rds;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    MembersSet: IMetaMembersSet;
    Member: IMetaMember;
Begin
    MembersSet := MetaAttributesTreeListNet1.CtrlBox.GetSelectedMembers(FalseTrueTrue);
    MembersSet.Reset();
    While Not MembersSet.Eof() Do
        Member := MembersSet.Current();
        System.Diagnostics.Debug.WriteLine(Member.Name);
        MembersSet.Next();
    End While;
End Sub;

See also:

IMetaAttributesTreeList