Returns either the top members of a dimension hierarchy or the child members of a parent member.
<IHsvTreeInfo>.EnumIDsOfChildren(lListTopMemberID, lItemID, pvarChildIDArray)
Integer. Indicates the success of the function call; returns 0 for success or -1 for an error.
This example prints the member labels of the Entity dimension’s top members to the Immediate window. Note how -1 is passed to both the lListTopMemberID and lItemID arguments.
Dim cMetadata As HsvMetadata, cTreeInfo As IHsvTreeInfo
Dim vaChildIDs, sLabel As String, iSuccess As Integer
Set cMetadata = m_cSession.Metadata
Set cTreeInfo = cMetadata.Entities
iSuccess = cTreeInfo.EnumIDsOfChildren(TREE_ROOT, -1, _
vaChildIDs)
If iSuccess = 0 Then
For i = LBound(vaChildIDs) To UBound(vaChildIDs)
cTreeInfo.GetLabel CLng(vaChildIDs(i)), sLabel
Debug.Print sLabel
Next i
End If
If you replaced the line above that calls EnumIDsOfChildren with the following lines, then the example would print the children of the California entity: |