I'm just a new bie. I've made a simple list box with some text entries. I can drag from any node to Acad's Drawing area and drop it. And without writing any code to capture Drop event, same text is written there in Top Left corner of Drawing area.
I want to Catpure this Drop even of Acad Drawing area. I will then be able to use Jig classes to add my own entities.
I tried Application.DoDragDrop() method and invoke DragTarget.OnDrop() but confused very much
Any help would be really appreciated.
Thanks a bunch.
Solved! Go to Solution.
When you start the drag, call
Application.DoDragDrop(sourceControl, dataObject, .....)
Then you need to create a class that implements DropTarget which the OnDrop method, this among others, get the data passed on the second parameter of DoDragDrop
Also convert the point to AutoCAD coordinates with
Editor ed = AppAutoCAD.DocumentManager.MdiActiveDocument.Edito
int vport = (short)AppAutoCAD.GetSystemVariable("CVPORT");
Point3d insertPoint = ed.PointToWorld(new Point(e.X, e.Y), vport);
Hope this help.