Returns an array containing the path of a dimension member and its ancestors; the array contains the member IDs of the members in this path. You can return the entire path or just a portion of the path.
For example, suppose an Entity dimension member named SanFrancisco has ancestors named California, UnitedStates, and Regional, respectively. You could use GetDefaultItemIDHierarchy to return the member IDs of the entire path, or to return the member IDs of only a portion of the path, such as the portion from UnitedStates down.
<IHsvTreeInfo>.GetDefaultItemIDHierarchy(lListID, lListTopMemberID, lItemID, lParentID, pvarItemIDHierarchy)
Integer. Indicates the success of the function call; returns 0 for success or -1 for an error.
The following example returns the member IDs of the SanFrancisco entity’s ancestors, filtering out all members in the hierarchy above UnitedStates.
Dim cTreeIn As IHsvTreeInfo, lEnt As Long Dim lTop As Long, lPar As Long, vaIDs, sLabel As String Dim iRet As Integer Set cTreeIn = m_cMetadata.Entities lTop = cTreeIn.GetItemID("UnitedStates") lEnt = cTreeIn.GetItemID("SanFrancisco") lPar = cTreeIn.GetItemID("California") cTreeIn.GetDefaultItemIDHierarchy MEMBER_LIST_ALL_HIERARCHY, _ lTop, lEnt, lPar, vaIDs For i = LBound(vaIDs) To UBound(vaIDs) cTreeIn.GetLabel vaIDs(i), sLabel Debug.Print sLabel Next i