IAttributeValueTreeListNode.Value

Syntax

Value: Integer;

Description

The Value property returns an attribute value.

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. For the MetaAttributesBreadcrumb and MetaAttributesTreeList components the same time series database is set. The MetaAttributesBreadcrumb component determines the value of the Breadcrumb property for MetaAttributesTreeList.

After the form run an attribute, that determines the time series database tree hierarchy, must be selected in the MetaAttributesBreadcrumb component. Then the hierarchy elements of the MetaAttributesBreadcrumb component need to be selected and the button needs to be clicked. 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