AnnGetSelectList example for Visual Basic
Note: This topic is for Document/Medical only.
This example gets the number of selected annotation objects; then it gets an array of the selected object handles and checks to see if any of the objects in the array are polygons.
Dim nType As Integer
Dim a As Integer
Dim bSelected As Boolean
Dim uCount As Integer
Dim aObjects As Variant 'array for the selected object handles
bSelected = False
uCount = Lead1.AnnGetSelectCount 'get number of selected objects
aObjects = Lead1.AnnGetSelectList 'get the handles of the selected objects
MsgBox CStr(uCount) & " objects were selected"
For a = 1 To uCount
nType = Lead1.AnnGetType(aObjects(a - 1))
If nType = ANNOBJECT_POLYGON Then 'Is the object a polygon?
bSelected = True
End If
Next
If bSelected <> True Then
MsgBox "No Polygon Objects were selected"
End If