GetElementLevel Example for Visual Basic
Private Sub TestProc()
Dim x As Long
Dim lLevel As Long
'Navigate the Data Set as a List, not as a Tree
'Move to the 20th element, and then find that element's level in the Tree
LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVEELEMENTERROR
'move to first element in Data Set
LEADDICOM1.MoveFirstElement False
'move to the 20th element
For x = 2 To 20
LEADDICOM1.MoveNextElement False
Next
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
lLevel = LEADDICOM1.GetElementLevel
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name & " at level " & CStr(lLevel)
Exit Sub
MOVEELEMENTERROR:
MsgBox "Error"
End Sub