Returns the number of parents for a dimension member, given the member’s ID.
<IHsvTreeInfo>.GetNumParents lMemberID, plNum
This example creates a function that takes an Entity dimension member’s label and returns a count of the member’s parents. GetItemID gets the member’s ID, which is passed to GetNumParents. The count of members returned by GetNumParents is assigned as the function’s return value.
Function getEntityParentCount(sChildLabel As String) As Long Dim cTreeInfo As IHsvTreeInfo, lChildID As Long Dim lNumParents As Long Set cTreeInfo = m_cMetadata.Entities lChildID = cTreeInfo.GetItemID(sChildLabel) cTreeInfo.GetNumParents lChildID, lNumParents getEntityParentCount = lNumParents End Function