Returns an array containing the member IDs of the dimension members in either the default dimension hierarchy or in a member list. The value passed to the lListID argument determines whether the returned IDs are from the default hierarchy or from a list.
To return members of a dynamic member list, use EnumMembers2. |
For the Entity dimension, EnumMembers returns child entity member IDs in the pvaralItemIDs argument and the corresponding parent member IDs in the pvaralParentIDs argument. For the other dimensions, EnumMembers returns members in the pvaralItemIDs argument, and the pvaralParentIDs argument is left uninitialized.
If you return members from the default dimension hierarchy, you can also use the lListTopMemberID argument to return only members of a given node. |
<IHsvTreeInfo>.EnumMembers lListID, lListTopMemberID, pvaralItemIDs, pvaralParentIDs
Long (ByVal). Identifies either the default dimension hierarchy or a member list. Pass the HFMConstants type library constant MEMBER_LIST_ALL_HIERARCHY to return the members in the default hierarchy, or a valid list ID to return the members in a member list. You can get member list IDs with GetMemberListID. For more information, see GetMemberListID. | |
Long (ByVal). The usage of this argument depends on what you pass to the lListID argument:
| |
Variant array. For the Entity dimension, this argument returns the member IDs of the child entities. For the other dimensions, this argument returns the member IDs of the dimension members. | |
Variant array. For the Entity dimension, this argument returns the member IDs of the parents of the members returned in the pvaralItemIDs argument. The array is returned as a Long subtype. |
The following example prints out a node of the Entity dimension to the Immediate window. The node’s parent member is Europe; note how MEMBER_LIST_ALL_HIERARCHY is passed as the lListID argument and how Europe’s member ID is passed as the lListTopMemberID argument.
Dim cTreeInfo As IHsvTreeInfo
Dim vaChildIDs, vaParIDs, lEnt As Long
Dim sLabel As String, sParLabel As String
Set cTreeInfo = m_cMetadata.Entities
lEnt = cTreeInfo.GetItemID("Europe")
cTreeInfo.EnumMembers MEMBER_LIST_ALL_HIERARCHY, lEnt, _
vaChildIDs, vaParIDs
For i = LBound(vaChildIDs) To UBound(vaChildIDs)
cTreeInfo.GetLabel CLng(vaParIDs(i)), sParLabel
cTreeInfo.GetLabel CLng(vaChildIDs(i)), sLabel
Debug.Print sParLabel & " " & sLabel
Next i