Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Sunday, November 2, 2008 6:15:01 PM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 367

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.
LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

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.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.046 seconds.