IVZTreeItem.Selected

Fore Syntax

Selected: Boolean;

Fore.NET Syntax

Selected: boolean;

Description

The Selected property determines whether visualizer tree area is selected.

Comments

Available values:

Fore Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier. Displaying of the Bubble Tree visualizer is set up in the express report.

Add links to the Metabase, Express, Visualizators system assemblies.

Sub UserProc;
Var
    Metabase: IMetabase;
    EaxAnalyzer: IEaxAnalyzer;
    BubbleTree: IVZBubbleTree;
    RootItem: IVZTreeItem;
    Items: IVZTreeItems;
    Index: Integer;
    Item: IVZTreeItem;
    Model: IVZTreeModel;
Begin
    Metabase := MetabaseClass.Active;
    EaxAnalyzer := Metabase.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
    // Tree model
    Model := BubbleTree.Model;
    // Bubble tree root element
    RootItem := Model.RootItem;
    //RootItem.Selected := False;
    RootItem.Selected := True;
    Debug.WriteLine("Root element identifier: " + RootItem.ID);
    // Parent elements of tree
    Items := RootItem.Items;
    Debug.WriteLine("=== Children ===");
    For Index := 0 To Items.Count-1 Do
        // Identifiers of children by index
        Item := Items.Item(Index);
        Debug.WriteLine((Index+1).ToString + ". Identifier: " + " " + Item.ID + ", parent: " + Item.Parent.ID);
    End For;
    (EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the console window displays the following information:

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Visualizators;

Public Shared Sub Main(Params: StartParams);
Var
    Metabase: IMetabase;
    EaxAnalyzer: IEaxAnalyzer;
    BubbleTree: IVZBubbleTree;
    RootItem: IVZTreeItem;
    Items: IVZTreeItems;
    Index: Integer;
    Item: IVZTreeItem;
    Model: IVZTreeModel;
Begin
    Metabase := Params.Metabase;
    EaxAnalyzer := Metabase.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
    BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
    // Tree model
    Model := BubbleTree.Model;
    // Bubble tree root element
    RootItem := Model.RootItem;
    //RootItem.Selected := False;
    RootItem.Selected := True;
    System.Diagnostics.Debug.WriteLine("Root element identifier: " + RootItem.ID);
    // Parent elements of tree
    Items := RootItem.Items;
    System.Diagnostics.Debug.WriteLine("Children: ");
    For Index := 0 To Items.Count-1 Do
        // Identifiers of children by index
        Item := Items.Item[Index];
        System.Diagnostics.Debug.WriteLine((Index+1).ToString() + ". Identifier: " + " " + Item.ID + ", parent: " + Item.Parent.ID);
    End For;
    (EaxAnalyzer As IMetabaseObject).Save();
End Sub;

See also:

IVZTreeItem