<?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 prompt user select part of polyline in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8608829#M23445</link>
    <description>&lt;P&gt;There is no direct API method(s) that you can call for your purpose. But one should be able to write code to achieve that, such as using DrawableOverrule, and/or Transient Graphics, or combination of them, and maybe, plus the handling of PointMonitor event. The code would be quite complicated, depending what kind of visual hints you want to lead user to select portion of the polyline. I'd imagine to code would:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Start handing PointMonitor event to detect whether the cursor is close/hover the polyline;&lt;/P&gt;
&lt;P&gt;2. If yes, draw transient graphic on that portion of polyline (segment between 2 vertices, be it a straight line, or an arc, you should figure it out based on the polyline and the vertices). So, this transient graphic would serve as visual hint to user that certain portion of the polyline is to be selected.&lt;/P&gt;
&lt;P&gt;3. If user click the mouse button (thus "select" this portion of polyline), you would update the transient graphic to indicates that (say, change its color, or make it thicker...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is just a rough idea. It might also be possible to write code to achieve the same visual effect as you do with Ctrl + select to the polyline. Again, this would required advanced coding skill with AutoCAD .NET APIs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Feb 2019 16:03:03 GMT</pubDate>
    <dc:creator>norman.yuan</dc:creator>
    <dc:date>2019-02-20T16:03:03Z</dc:date>
    <item>
      <title>How prompt user select part of polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8606417#M23441</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using construction&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;// Request for objects to be selected in the drawing area
            acSSPrompt = acDocEd.GetSelection(new PromptSelectionOptions
            {
                SingleOnly = true,
                ForceSubSelections = true
            });&lt;/PRE&gt;
&lt;P&gt;two times and each time I'm selecting different parts of polyline , but Object Id for both selections are the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 19:21:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8606417#M23441</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-19T19:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: How prompt user select part of polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8606516#M23442</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ForceSubSelections is to be used to force the selection of 'sub-objects' such as faces, edges or vetices of Solid3d objects.&lt;/P&gt;
&lt;P&gt;A Polyline (LWPOLYLINE) is a simple entity which does not have sub-objects.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 20:07:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8606516#M23442</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2019-02-19T20:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: How prompt user select part of polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8607811#M23443</link>
      <description>&lt;P&gt;Hi Gile,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you for explanation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that case how prompt user select one arc as part of polyline?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's say, that single polyline is combination of 9 arcs. And user should select any from the arcs.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 09:14:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8607811#M23443</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-20T09:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: How prompt user select part of polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8608033#M23444</link>
      <description>&lt;P&gt;Polyline is single entity, irrespective of where you click, you will ObjectId of the Polyline, of course user can use CTRL+Selection on Polyline, in that case only hovered entity get highlighted, but again you will get ObjectId of Polyline not the segments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is your objective, do you want operate on segments user has hovered?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 10:55:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8608033#M23444</guid>
      <dc:creator>moogalm</dc:creator>
      <dc:date>2019-02-20T10:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: How prompt user select part of polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8608829#M23445</link>
      <description>&lt;P&gt;There is no direct API method(s) that you can call for your purpose. But one should be able to write code to achieve that, such as using DrawableOverrule, and/or Transient Graphics, or combination of them, and maybe, plus the handling of PointMonitor event. The code would be quite complicated, depending what kind of visual hints you want to lead user to select portion of the polyline. I'd imagine to code would:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Start handing PointMonitor event to detect whether the cursor is close/hover the polyline;&lt;/P&gt;
&lt;P&gt;2. If yes, draw transient graphic on that portion of polyline (segment between 2 vertices, be it a straight line, or an arc, you should figure it out based on the polyline and the vertices). So, this transient graphic would serve as visual hint to user that certain portion of the polyline is to be selected.&lt;/P&gt;
&lt;P&gt;3. If user click the mouse button (thus "select" this portion of polyline), you would update the transient graphic to indicates that (say, change its color, or make it thicker...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is just a rough idea. It might also be possible to write code to achieve the same visual effect as you do with Ctrl + select to the polyline. Again, this would required advanced coding skill with AutoCAD .NET APIs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 16:03:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8608829#M23445</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2019-02-20T16:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: How prompt user select part of polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8610685#M23446</link>
      <description>&lt;P&gt;Hi Norman,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you for detailed reply. For my task I did "explode" for Polyline and then user was able to work with list of arcs/lines.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 08:41:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8610685#M23446</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-21T08:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: How prompt user select part of polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8615249#M23447</link>
      <description>&lt;P&gt;If you set PrepareOptionalDetails and SinglePickInSpace to true, then the GraphicsSystemMarker property of the SelectedObject should be the index of the selected Polyline vertex (I haven't actually confirmed that this works, but it seems logical that it should).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the GraphicsSystemMarker property is zero, then you could find the index of the selected vertex using the pick point and the Curve's GetClosestPointTo() and GetParameterAtPoint() methods.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mind you, either of these only give you index of the selected Polyline vertex.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Gile,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you for explanation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that case how prompt user select one arc as part of polyline?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's say, that single polyline is combination of 9 arcs. And user should select any from the arcs.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 19:35:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8615249#M23447</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2019-02-22T19:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: How prompt user select part of polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8625624#M23448</link>
      <description>&lt;P&gt;OK, I found a bit time writing some code to materialize what I said in previous reply. I published the code with a video clips here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://drive-cad-with-code.blogspot.com/2019/02/visually-select-segment-of-polyline.html" target="_blank" rel="noopener"&gt;https://drive-cad-with-code.blogspot.com/2019/02/visually-select-segment-of-polyline.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2019 18:45:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-prompt-user-select-part-of-polyline/m-p/8625624#M23448</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2019-02-27T18:45:48Z</dc:date>
    </item>
  </channel>
</rss>

