GetNumChildren

Returns the number of children that are one level beneath a dimension member in a dimension hierarchy.

Syntax

<IHsvTreeInfo>.GetNumChildren(lItemID, plNum)

Argument

Description

lItemID

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

plNum

Long. Returns the number of children beneath the dimension member.

Return Value

Integer. Indicates the success of the function call; returns 0 for success or -1 for an error.

Example

This example tests whether the entity specified in a combo box named comboEnts has children. If the entity has children, then any code placed within the If structure would be executed.

Dim cIHsvTreeInfo As IHsvTreeInfo, sEnt As String
Dim lNumChild As Long, lEnt As Long
sEnt = comboEnts.Text
Set cIHsvTreeInfo = m_cMetadata.Entities
lEnt = cIHsvTreeInfo.GetItemID(sEnt)
cIHsvTreeInfo.GetNumChildren lEnt, lNumChild
If lNumChild > 0 Then
  MsgBox Str(lNumChild)
End If