Identity: Integer;
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.
Executing the example requires a .NET form that contains the MetaAttributesTreeListNet component with the metaAttributesTreeListNet1 identifier. This component is set up to work with a time series database.
Imports Prognoz.Platform.Interop.Rds;
…
Public Sub UserProc();
Var
SelNodes: Array;
Mems: IMetaMembersSet;
Mem: IMetaMember;
Leaf: IMetaMemberLeaf;
Begin
SelNodes := metaAttributesTreeListNet1.CtrlBox.GetSelectedNodes();
Mems := metaAttributesTreeListNet1.CtrlBox.GetNodesMembers(SelNodes);
If Not Mems.Eof() Then
Mems.Reset();
Repeat
Mem := Mems.Current();
If Mem.IsLeaf Then
Leaf := Mem As IMetaMemberLeaf;
System.Diagnostics.Debug.WriteLine("Numeric identifier: "
+ Leaf.Identity.ToString());
System.Diagnostics.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 metaAttributesTreeListNet1.
See also: