Returns the number of descendants beneath a member in a dimension’s hierarchy, given the member’s ID.
<IHsvTreeInfo>.GetNumDescendants lParentID, plNum
This example creates a function that takes a Scenario dimension member’s label and returns a count of the member’s descendants. The label is passed to GetItemID, which returns the member’s ID. This ID is passed to GetNumDescendants, which returns the number of descendants that is assigned as the function’s return value.