Indicates whether one member is a descendant beneath another member in a dimension hierarchy.
<IHsvTreeInfo>.IsMemberADescendantOf lMemberID, lParentID, pvarbIsDescendantOf
This example creates a function that takes two dimension member labels and returns a Boolean indicating whether the first member is a descendant beneath the second member. GetItemID returns the member IDs of the dimension members passed to the function. These IDs are passed to IsMemberADescendantOf, and the Boolean returned is assigned as the example function’s return value.
Function isDescEntityFromLabel(sMem, sPar) As Boolean Dim cTreeInfo As IHsvTreeInfo, lMemID As Long Dim lParID As Long, bReturn As Boolean Set cTreeInfo = m_cMetadata.Entities lMemID = cTreeInfo.GetItemID(sMem) lParID = cTreeInfo.GetItemID(sPar) cTreeInfo.IsMemberADescendantOf lMemID, lParID, bReturn isDescEntityFromLabel = bReturn End Function