<?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: e.Context.GetPickedEntities() not finding any entities in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/e-context-getpickedentities-not-finding-any-entities/m-p/9378892#M20115</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/32637"&gt;@Jeff_M&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In what context the PointMonitor is handled? It looks like, it is used in a kind of "custom jig" style operation, such as the Editor is waiting for user input from mouse click (Ediotr.GetXxxx()), and when user moves mouse to mull where to pick, the PointMonitor handler generates moving ghost. If so, I believe when Editor is in this state, PointMonitorEventArgs.Context.GetPickedEntities() does not return entities at mouse cursor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I mentioned this in my latest blog post (yesterday):&lt;/P&gt;
&lt;P&gt;&lt;A href="https://drive-cad-with-code.blogspot.com/2020/03/showing-helpful-information-as-tool-tip.html" target="_blank" rel="noopener"&gt;https://drive-cad-with-code.blogspot.com/2020/03/showing-helpful-information-as-tool-tip.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 15 Mar 2020 13:25:19 GMT</pubDate>
    <dc:creator>Norman_Yuan</dc:creator>
    <dc:date>2020-03-15T13:25:19Z</dc:date>
    <item>
      <title>e.Context.GetPickedEntities() not finding any entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/e-context-getpickedentities-not-finding-any-entities/m-p/9378345#M20114</link>
      <description>&lt;P&gt;I have a number of these PointMonitors in different tools which all work flawlessly. I have one tool that is never finding any entities in the PointMonitor Event. It's so basic that I just don't understand why it's doing this. In the below code it always exits due to paths being null or empty. The TransientGraphics that update do so as they should, so I know the PointMonitor is working. I checked my Aperture setting in case it got set to 0, but it's 10 as always.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas why it's not finding any entities?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;        private void Editor_PointMonitor(object sender, PointMonitorEventArgs e)
        {
            _currentPoint = e.Context.RawPoint;
            UpdateTransGraphics(_currentPoint);
            
            FullSubentityPath[] paths = e.Context.GetPickedEntities();

            if (paths == null || paths.Length == 0)
                return;

            ObjectId[] ids = paths[0].GetObjectIds();

            if (ids == null || ids.Length == 0)
                return;

            ObjectId id = ids[0];
            if (id.ObjectClass.DxfName != RXClass.GetClass(typeof(CogoPoint)).DxfName)
                return;
            NextPtId = id;
        }
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Mar 2020 20:05:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/e-context-getpickedentities-not-finding-any-entities/m-p/9378345#M20114</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2020-03-14T20:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: e.Context.GetPickedEntities() not finding any entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/e-context-getpickedentities-not-finding-any-entities/m-p/9378892#M20115</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/32637"&gt;@Jeff_M&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In what context the PointMonitor is handled? It looks like, it is used in a kind of "custom jig" style operation, such as the Editor is waiting for user input from mouse click (Ediotr.GetXxxx()), and when user moves mouse to mull where to pick, the PointMonitor handler generates moving ghost. If so, I believe when Editor is in this state, PointMonitorEventArgs.Context.GetPickedEntities() does not return entities at mouse cursor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I mentioned this in my latest blog post (yesterday):&lt;/P&gt;
&lt;P&gt;&lt;A href="https://drive-cad-with-code.blogspot.com/2020/03/showing-helpful-information-as-tool-tip.html" target="_blank" rel="noopener"&gt;https://drive-cad-with-code.blogspot.com/2020/03/showing-helpful-information-as-tool-tip.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2020 13:25:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/e-context-getpickedentities-not-finding-any-entities/m-p/9378892#M20115</guid>
      <dc:creator>Norman_Yuan</dc:creator>
      <dc:date>2020-03-15T13:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: e.Context.GetPickedEntities() not finding any entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/e-context-getpickedentities-not-finding-any-entities/m-p/9379011#M20116</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@Norman_Yuan&lt;/a&gt;&amp;nbsp;! Nice solution you created in the blog post.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2020 15:50:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/e-context-getpickedentities-not-finding-any-entities/m-p/9379011#M20116</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2020-03-15T15:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: e.Context.GetPickedEntities() not finding any entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/e-context-getpickedentities-not-finding-any-entities/m-p/9379086#M20117</link>
      <description>&lt;P&gt;Other solution (if I remember correctly)&amp;nbsp; is using Editor.TurnForcedPickOn/Editor.TurnForcedPickOff pair.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2020 17:15:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/e-context-getpickedentities-not-finding-any-entities/m-p/9379086#M20117</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2020-03-15T17:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: e.Context.GetPickedEntities() not finding any entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/e-context-getpickedentities-not-finding-any-entities/m-p/9379546#M20118</link>
      <description>&lt;P&gt;Great suggestion,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/481027"&gt;@Alexander.Rivilis&lt;/a&gt;&amp;nbsp;, Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I never noticed/paid attention to this pair of methods. I went ahead to give it a try, and yes, it does forces the PointMonitorEventArgs.Context.GetPickedEntities() to return entities at/near mouse cursor when the Editor is waiting for user input(picking). So, while my original code in my article works, using this pair of methods seems a more elegant approach.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have updated the code in my article. Thank you again,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/481027"&gt;@Alexander.Rivilis&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 03:01:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/e-context-getpickedentities-not-finding-any-entities/m-p/9379546#M20118</guid>
      <dc:creator>Norman_Yuan</dc:creator>
      <dc:date>2020-03-16T03:01:11Z</dc:date>
    </item>
  </channel>
</rss>

