IsMemberADescendantOf

Indicates whether one member is a descendant beneath another member in a dimension hierarchy.

Syntax

<IHsvTreeInfo>.IsMemberADescendantOf lMemberID, lParentID, pvarbIsDescendantOf

Argument

Description

lMemberID

Long (ByVal). The member ID of the possible descendant.

lParentID

Long (ByVal). The member ID of the possible higher-level dimension member.

pvarbIsDescendantOf

Boolean. Returns TRUE if the member identified by the lMemberID argument is a descendant beneath the member identified by the lParentID argument, FALSE otherwise.

Example

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