IAttributeValueTreeListNode.GetKeys

Syntax

GetKeys(Attribute: String): Array;

Parameters

Attribute - attribute name.

Description

The GetKeys method returns the array of indicators keys.

Example

Executing the example requires a form with the Button1 button, the MetaAttributesBreadcrumb component and the MetaAttributesTreeList component with the MetaAttributesTreeList1 identifier, also the Memo component with the Memo1 identifier is required. The same time series database is set for the MetaAttributesBreadcrumb and MetaAttributesTreeList components. The MetaAttributesBreadcrumb component determines the value of the Breadcrumb property for MetaAttributesTreeList.

After launching the form select the attribute that determines the time series database tree hierarchy in the MetaAttributesBreadcrumb component. Then select the hierarchy elements of the MetaAttributesBreadcrumb component and click the button. The example will be executed.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Nodes: ITreeListSelection;

Node: ITreeListNode;

MetaAttrTLN: IMetaAttributesTreeListNode;

AttrValueTLN: IAttributeValueTreeListNode;

Keys: Array Of Integer;

Begin

Nodes := MetaAttributesTreeList1.Selection;

For Each Node In Nodes Do

MetaAttrTLN := Node As IMetaAttributesTreeListNode;

If MetaAttrTLN <> Null Then

If MetaAttrTLN.Type = MetaAttributesNodeType.AttributeValueNode Then

AttrValueTLN := MetaAttrTLN As IAttributeValueTreeListNode;

Memo1.Lines.Add("The selected element: " + AttrValueTLN.Text);

Memo1.Lines.Add("    Attribute: " + AttrValueTLN.AttributeName);

Memo1.Lines.Add("    The attribute key: " + AttrValueTLN.AttributeKey.ToString);

Memo1.Lines.Add("    The attribute value: " + AttrValueTLN.Value.ToString);

Keys := AttrValueTLN.GetKeys(AttrValueTLN.AttributeName);

Memo1.Lines.Add("    Time series count:" + Keys.Length.ToString);

End If;

End If;

End For;

End Sub Button1OnClick;

After executing the example the information of hierarchy selected root elements, which values are determined by dictionary data, and the elements names are displayed in the Memo1 component.

See also:

IAttributeValueTreeListNode