LEADTOOLS Support
Document
Document SDK Examples
How to find selected annotations objects in .NET
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Sunday, November 2, 2008 6:15:01 PM(UTC)
Groups: Tech Support
Posts: 366
Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
The following snippet of VB.NET code is designed to figure out what annotation objects are selected withing the annotation automation manager. There could be multiple objects being editted, so an AnnGroupObject can be returned when retreiving the object(s) currently being editted in the automation manager.
This code first checks to make sure there is at least one object being editted, and then determines if it's multiple object or just one object. The logic for what to do when an object has been found has been omitted.
Dim group_Of_Objects As AnnGroupObject
Dim singleObject As Object = AnnAutomation.CurrentEditObject
If Not singleObject Is Nothing Then
If TypeOf singleObject Is AnnGroupObject Then
group_Of_Objects = CType(singleObject, AnnGroupObject)
For Each Item As AnnObject In group_Of_Objects.Objects
'Execute methods of the selected objects
Next
Else
' Probably just one object.
' Check for each individual type if necessary.
End
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEADTOOLS Support
Document
Document SDK Examples
How to find selected annotations objects in .NET
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.