<?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: Get mouse position in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/get-mouse-position/m-p/7290901#M13004</link>
    <description>&lt;P&gt;@Anonymous&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry but it is ObjectARX forum and not AutoCAD .NET API forum. AutoCAD .NET API forum here: &lt;A href="https://forums.autodesk.com/t5/net/bd-p/152" target="_blank"&gt;https://forums.autodesk.com/t5/net/bd-p/152&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Aug 2017 14:42:38 GMT</pubDate>
    <dc:creator>Alexander.Rivilis</dc:creator>
    <dc:date>2017-08-10T14:42:38Z</dc:date>
    <item>
      <title>Get mouse position</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/get-mouse-position/m-p/4682337#M13000</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do to get the cursor position in AutoCAD. I want to get those coordinates that are in the lower left corner in AutoCAD. I saw a solution in C + + but I could not do the same with VB, I need to do this with VB if possible i&lt;SPAN&gt;&amp;nbsp;even use the Point API but can't link with AutoCAD, how i can handle the cursor in .NET?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://adndevblog.typepad.com/autocad/2013/08/get-mouse-cursor-position-without-event.html" target="_blank"&gt;http://adndevblog.typepad.com/autocad/2013/08/get-mouse-cursor-position-without-event.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, sorry my bad english.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2013 18:26:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/get-mouse-position/m-p/4682337#M13000</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-09T18:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get mouse position</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/get-mouse-position/m-p/4711161#M13001</link>
      <description>&lt;P&gt;Hi Josuesasilva,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a discussion forum dedicated to AutoCAD .Net API related queries. Posting your query there will help get you answers quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;About your query :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The blog post that you mentioned does not use events and relies on the Windows API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The easier and more reliable way would be to use the events.&lt;/P&gt;
&lt;P&gt;To use the PointMonitor event, please refer to this blog post. This lesson also has a sample code in VB.Net.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://adndevblog.typepad.com/autocad/2012/10/autocadnet-lesson-6-input-point-monitor.html" target="_blank"&gt;http://adndevblog.typepad.com/autocad/2012/10/autocadnet-lesson-6-input-point-monitor.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After you have the PointMonitor event subscribed, you can use the "PointMonitorEventArgs.InputPointContext.RawPoint" or the "ComputedPoint" to get the coordinates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Balaji&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2013 07:08:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/get-mouse-position/m-p/4711161#M13001</guid>
      <dc:creator>Balaji_Ram</dc:creator>
      <dc:date>2013-12-23T07:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get mouse position</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/get-mouse-position/m-p/4711189#M13002</link>
      <description>&lt;P&gt;2 ways to get cursor position&amp;nbsp;&lt;/P&gt;&lt;P&gt;1, mfc api,&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;BOOL getCursorPos( MSG *msg)
{
if( msg-&amp;gt;message == WM_MOUSEMOVE )//here you can add the message you want to watch
{
CPoint pt1;
pt1 = msg-&amp;gt;pt;
acedGetAcadDwgView()-&amp;gt;ScreenToClient( &amp;amp;pt1 );
acedDwgPoint pt2;
acedCoordFromPixelToWorld( 0, pt1, pt2 );
}

}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;the pt2, is the format of ads_point&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2, objectarx api&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; the objectarx class,&amp;nbsp;&lt;SPAN class="H1Overlay"&gt;AcEdInputPointMonitor, shall do the thing you need, which can be find in the referece guide.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="H1Overlay"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="H1Overlay"&gt;hope these can solve the problems&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2013 07:47:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/get-mouse-position/m-p/4711189#M13002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-23T07:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get mouse position</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/get-mouse-position/m-p/7290879#M13003</link>
      <description>&lt;P&gt;[CommandMethod("DT")]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public void &amp;nbsp;mousepoint()&lt;BR /&gt;{&lt;BR /&gt;Editor acDocEd = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;acDocEd.PointMonitor += new PointMonitorEventHandler(ed_PointMonitor);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;private static void ed_PointMonitor(object sender, PointMonitorEventArgs e)&lt;BR /&gt;{&lt;BR /&gt;Editor ed = sender as Editor;&lt;BR /&gt;ed.WriteMessage("\n" + e.Context.ComputedPoint.X + "|" + e.Context.ComputedPoint.Y);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[CommandMethod("DT1")]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public void removeregistry()&lt;BR /&gt;{&lt;BR /&gt;Editor acDocEd = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;acDocEd.PointMonitor -= new PointMonitorEventHandler(ed_PointMonitor);&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 14:36:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/get-mouse-position/m-p/7290879#M13003</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-10T14:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get mouse position</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/get-mouse-position/m-p/7290901#M13004</link>
      <description>&lt;P&gt;@Anonymous&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry but it is ObjectARX forum and not AutoCAD .NET API forum. AutoCAD .NET API forum here: &lt;A href="https://forums.autodesk.com/t5/net/bd-p/152" target="_blank"&gt;https://forums.autodesk.com/t5/net/bd-p/152&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 14:42:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/get-mouse-position/m-p/7290901#M13004</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2017-08-10T14:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get mouse position</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/get-mouse-position/m-p/9277902#M13005</link>
      <description>&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 20:58:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/get-mouse-position/m-p/9277902#M13005</guid>
      <dc:creator>yulianagonzalezz</dc:creator>
      <dc:date>2020-01-27T20:58:17Z</dc:date>
    </item>
  </channel>
</rss>

