Returns an array containing the member IDs of a given member’s descendants.
<IHsvTreeInfo>.EnumDescendants lItemID, bIgnoreDups, pvaralIDs
The following example prints the labels of the UnitedStates entity’s descendant members to the Immediate window. The example loops through the array returned by EnumDescendants, passing the member IDs to GetLabel.
Dim cMetadata As HsvMetadata, lMember As Long
Dim cTreeInfo As IHsvTreeInfo, vaIDs
Dim sLabel As String
Set cMetadata = m_cSession.Metadata
Set cTreeInfo = cMetadata.Entities
lMember = cTreeInfo.GetItemID("UnitedStates")
cTreeInfo.EnumDescendants lMember, FALSE, vaIDs
'Exit the sub if there are no descendants
If IsEmpty(vaIDs) = True Then Exit Sub
For i = LBound(vaIDs) To UBound(vaIDs)
cTreeInfo.GetLabel vaIDs(i), sLabel
Debug.Print sLabel
Next i