Returns a Boolean that indicates whether an entity is a child of another entity.
<HsvEntities>.IsChild lParentID, lEntityID, pbIsChild
The following example uses IsChild to see if the entity specified in the comboParent combo box is a parent of the entity specified in the comboChild combo box. If there is no parent-child relationship, the user is warned and the procedure is exited.
Dim bIsChild As Boolean, cEntities As HsvEntities
Dim cTreeInfo As IHsvTreeInfo, lParID As Long, lChildId As Long
Set cEntities = m_cMetadata.Entities
Set cTreeInfo = m_cMetadata.Entities
lParID = cTreeInfo.GetItemID(comboParent.Text)
lChildId = cTreeInfo.GetItemID(comboChild.Text)
cEntities.IsChild lParID, lChildId, bIsChild
If bIsChild = False Then
MsgBox "The entities don’t have a parent-child relationship!"
Exit Sub
End If