Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I have a problem . Hope somebody could correct me. I am going to collect objectid's of the moved items in drawing after they moved to destination. So I wrote an event to monitor move command , by using object modified event handler. when I run below code for every entity it collects 2 object id. One before move and one after move. Is there any way to just collect object ids after they moved?
Thanks for any help.
Janet.
Class EVENTS Dim MyDwg As Document = Application.DocumentManager.MdiActiveDocument Dim Myed As Editor = MyDwg.Editor Dim Mydb As Database = MyDwg.Database Dim Myobjidcoll As ObjectIdCollection Sub On_Command_Will_Start(ByVal sender As Object, ByVal e As CommandEventArgs) Select Case e.GlobalCommandName Case "MOVE" Dim Myobjidcoll As New ObjectIdCollection AddHandler Mydb.ObjectModified, AddressOf Myobj_Moved End Select End Sub Sub Myobj_moved(ByVal sender As Object, ByVal e As ObjectEventArgs) Myobjidcoll.Add(e.DBObject.ObjectId) End Sub End Class
Solved! Go to Solution.