IVZTreeItem.GetItemById

Syntax

GetItemById(Value: String): IVZTreeItem;

Parameters

Value. Child element identifier.

Description

The GetItemById method returns child element of visualizer tree by identifier.

Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier. The report contains a bubble tree, for which observation objects are created by dimension selection. Dimension elements include an element with the ELEM identifier.

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

Sub UserProc;
Var
    Metabase: IMetabase;
    EaxAnalyzer: IEaxAnalyzer;
    BubbleTree: IVZBubbleTree;
    RootItem, ItemID, ItemNext, ItemPrev: IVZTreeItem;
    Items, Items2: IVZTreeItems;
    Item: IVZTreeItem;
    Model: IVZTreeModel;
Begin
    
// Get repository object
    Metabase := MetabaseClass.Active;
    
// Open express report
    EaxAnalyzer := Metabase.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    
// Get bubble tree
    BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
    
// Get tree model
    Model := BubbleTree.Model;
    
// Get bubble tree root element
    RootItem := Model.RootItem;
    Debug.WriteLine(
"Root element identifier: " + RootItem.ID);
    
// Get tree child elements
    Items := RootItem.Items;
    
// Get element with the ELEM identifier
    ItemID := RootItem.GetItemById("ELEM");
    
// Display neighbor element identifiers in the console
    ItemNext := ItemID.GetNext(True);
    ItemPrev := ItemID.GetPrev(
True);
    Debug.WriteLine(
"Neighbor elements: " + ItemNext.Id + ", " + ItemPrev.Id);
End Sub UserProc;

After executing the example the console displays identifiers of neighbor elements of the child element with the ELEM identifier.

See also:

IVZTreeItem