Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

How to find selected annotations objects in .NET
Started by Walter at 11-02-2008 23:20. Topic has 0 replies.

Print Search « Previous Thread Next Thread »
  11-02-2008, 23:20
Walter is not online. Last active: 7/2/2009 12:00:35 PM Walter



Top 25 Posts
Joined on 04-14-2008
Charlotte, NC
Posts 208
How to find selected annotations objects in .NET
Reply Quote
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
Technical Support
LEADTOOLS
support@leadtools.com
   Report 
Post
LEAD Support Fo... » General » Example Request... » How to find selected annotations objects in .NET

Powered by Community Server, by Telligent Systems