Identity: Integer;
The Identity property returns a numeric identifier of a dictionary element that corresponds to hierarchy element.
The element key is returned by the IMetaMemberLeaf.Key property.
Executing the example requires a form that contains the MetaAttributesTreeList component with the MetaAttributesTreeList1 identifier. This component is set up to work with a time series database.
Sub UserProc;
Var
SelNodes: Array;
Mems: IMetaMembersSet;
Mem: IMetaMember;
Leaf: IMetaMemberLeaf;
Begin
SelNodes := MetaAttributesTreeList1.GetSelectedNodes;
Mems := MetaAttributesTreeList1.GetNodesMembers(SelNodes);
If Not Mems.Eof Then
Mems.Reset;
Repeat
Mem := Mems.Current;
If Mem.IsLeaf Then
Leaf := Mem As IMetaMemberLeaf;
Debug.WriteLine("Numeric identifier: " + Leaf.Identity.ToString);
Debug.WriteLine("Key: " + Leaf.Key.ToString);
End If;
Mems.Next;
Until Mems.Eof;
End If;
End Sub UserProc;
After executing the example the console window shows numeric identifiers and keys of the factors selected in MetaAttributesTreeList1.
See also: