<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to capture Drop even on Acad Drawing area from Listbox? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-capture-drop-even-on-acad-drawing-area-from-listbox/m-p/3470856#M55461</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you start the drag, call&lt;/P&gt;
&lt;P&gt;Application.DoDragDrop(sourceControl, dataObject, .....)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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&lt;/P&gt;
&lt;P&gt;e.Data.GetData(typeof(YouDataType))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also convert the point to AutoCAD coordinates with&lt;/P&gt;
&lt;P&gt;Editor ed = AppAutoCAD.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;int vport = (short)AppAutoCAD.GetSystemVariable("CVPORT");&lt;BR /&gt;Point3d insertPoint = ed.PointToWorld(new Point(e.X, e.Y), vport);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Thu, 24 May 2012 13:50:57 GMT</pubDate>
    <dc:creator>augusto.goncalves</dc:creator>
    <dc:date>2012-05-24T13:50:57Z</dc:date>
    <item>
      <title>How to capture Drop even on Acad Drawing area from Listbox?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-capture-drop-even-on-acad-drawing-area-from-listbox/m-p/3470346#M55460</link>
      <description>&lt;P&gt;Hi Experts &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried Application.DoDragDrop() method and invoke DragTarget.OnDrop() but confused very much &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be really appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a bunch.&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2012 06:32:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-capture-drop-even-on-acad-drawing-area-from-listbox/m-p/3470346#M55460</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-24T06:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture Drop even on Acad Drawing area from Listbox?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-capture-drop-even-on-acad-drawing-area-from-listbox/m-p/3470856#M55461</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you start the drag, call&lt;/P&gt;
&lt;P&gt;Application.DoDragDrop(sourceControl, dataObject, .....)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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&lt;/P&gt;
&lt;P&gt;e.Data.GetData(typeof(YouDataType))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also convert the point to AutoCAD coordinates with&lt;/P&gt;
&lt;P&gt;Editor ed = AppAutoCAD.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;int vport = (short)AppAutoCAD.GetSystemVariable("CVPORT");&lt;BR /&gt;Point3d insertPoint = ed.PointToWorld(new Point(e.X, e.Y), vport);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2012 13:50:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-capture-drop-even-on-acad-drawing-area-from-listbox/m-p/3470856#M55461</guid>
      <dc:creator>augusto.goncalves</dc:creator>
      <dc:date>2012-05-24T13:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture Drop even on Acad Drawing area from Listbox?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-capture-drop-even-on-acad-drawing-area-from-listbox/m-p/3521370#M55462</link>
      <description>&lt;P&gt;Thanks a bunch for your reply. I did something similar while experimenting with some sample code.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2012 13:43:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-capture-drop-even-on-acad-drawing-area-from-listbox/m-p/3521370#M55462</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-29T13:43:39Z</dc:date>
    </item>
  </channel>
</rss>

