<?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 selection defined by polyline doesn't always work in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203393#M5303</link>
    <description>&lt;P&gt;So now for me, it works after OVERKILL, though not fully until I run OVERKILL a second time on the "A" outline.&amp;nbsp; And there's the "T" alteration issue....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll let you Search for routines to fix coincident vertices -- one would hope there's something out there that does it without changing any shapes as OVERKILL can.&amp;nbsp; I did something once called &lt;STRONG&gt;PLFixClose.lsp&lt;/STRONG&gt; that does it when there are two coincident vertices &lt;EM&gt;at the start/end location&lt;/EM&gt; [i.e. when a Polyline was drawn around all the way back to the start location and &lt;EM&gt;then&lt;/EM&gt; Closed, rather than Closed from the last location &lt;EM&gt;other than&lt;/EM&gt; the start], but that's not the situation in those of yours that I looked at, though it's close for the "o" outlines.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Dec 2024 14:57:19 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2024-12-10T14:57:19Z</dc:date>
    <item>
      <title>Get selection defined by polyline doesn't always work</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203289#M5298</link>
      <description>&lt;P&gt;I created a script that counts the number of blocks inside shapes in a selection en masse using Lee Mac's "Entity to point list" script in a polygonal window crossing selection. It works great except for some polylines that refuse to capture anything in the selection. I tested it and the&amp;nbsp;"Entity to point list" function works just fine. If offending polylines are exploded and then recreated individually with the join command, they work like normal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help debugging the script so it captures the selection of blocks inside &lt;U&gt;all&lt;/U&gt; polylines. My only idea for how to do that is to explode polylines when they come up with a "0" selection, run the "join" command on the results, and check the resulting polyline again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached is my script and a test document with mostly nonworking polylines and one working for a control.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks to anyone who can help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:07:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203289#M5298</guid>
      <dc:creator>JBW_AIScripts</dc:creator>
      <dc:date>2024-12-10T14:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get selection defined by polyline doesn't always work</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203335#M5299</link>
      <description>&lt;P&gt;I think those Polylines that don't work all have &lt;STRONG&gt;&lt;EM&gt;coincident vertices and therefore zero-length segments&lt;/EM&gt;&lt;/STRONG&gt;, which is known to cause all kind of problems with various AutoLisp operations.&amp;nbsp; [For example, both the "A" and the "C" outlines have their vertices 1 &amp;amp; 2 in the same place, but it's not the same in all of them.&amp;nbsp; The outer and inner outlines of the "o" each have&amp;nbsp;&lt;EM&gt;three&lt;/EM&gt; vertices in the same place.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OVERKILL fixes that, but does odd things to the shape of the "T" [and perhaps less noticeable odd things to other shapes].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BUT I don't understand how it's supposed to work.&amp;nbsp; The only defined command in the routine asks only for selection of Blocks, not Polylines.&amp;nbsp; What is the step-by-step User procedure supposed to be?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:37:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203335#M5299</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-12-10T14:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Get selection defined by polyline doesn't always work</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203344#M5300</link>
      <description>&lt;P&gt;Thanks for the quick reply! Could one potentially make a function that eliminates coincident vertices from the point list? I want to leave the original shapes unchanged, but I don't care if the selection point list is slightly different.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:31:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203344#M5300</guid>
      <dc:creator>JBW_AIScripts</dc:creator>
      <dc:date>2024-12-10T14:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get selection defined by polyline doesn't always work</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203348#M5301</link>
      <description>&lt;P&gt;[I added a paragraph at the end of my earlier Reply while yours was coming in -- see that first.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are certainly routines out there to eliminate coincident vertices in Polylines.&amp;nbsp; Whether any do it to a vertex list only rather than to the Polyline itself, I couldn't say.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:39:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203348#M5301</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-12-10T14:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Get selection defined by polyline doesn't always work</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203358#M5302</link>
      <description>&lt;P&gt;My bad, I accidently messed up the filtering on the main selection. I had it looking for more specific filtered shapes along with blocks and was careless adapting the code for the debug. Attached is a new version that should work with the example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The basic idea is the user selects all the blocks they want counted and all the shapes they want checked for the number of blocks they contain. The program makes a sublist of blocks and tests against that to find if it is a containing shape.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:39:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203358#M5302</guid>
      <dc:creator>JBW_AIScripts</dc:creator>
      <dc:date>2024-12-10T14:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get selection defined by polyline doesn't always work</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203393#M5303</link>
      <description>&lt;P&gt;So now for me, it works after OVERKILL, though not fully until I run OVERKILL a second time on the "A" outline.&amp;nbsp; And there's the "T" alteration issue....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll let you Search for routines to fix coincident vertices -- one would hope there's something out there that does it without changing any shapes as OVERKILL can.&amp;nbsp; I did something once called &lt;STRONG&gt;PLFixClose.lsp&lt;/STRONG&gt; that does it when there are two coincident vertices &lt;EM&gt;at the start/end location&lt;/EM&gt; [i.e. when a Polyline was drawn around all the way back to the start location and &lt;EM&gt;then&lt;/EM&gt; Closed, rather than Closed from the last location &lt;EM&gt;other than&lt;/EM&gt; the start], but that's not the situation in those of yours that I looked at, though it's close for the "o" outlines.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:57:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203393#M5303</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-12-10T14:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get selection defined by polyline doesn't always work</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203400#M5304</link>
      <description>&lt;P&gt;Thanks for your help. I think I can figure it out from here!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:55:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13203400#M5304</guid>
      <dc:creator>JBW_AIScripts</dc:creator>
      <dc:date>2024-12-10T14:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get selection defined by polyline doesn't always work</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13204243#M5305</link>
      <description>&lt;P&gt;Just a comment from past experience when using SSGET "CP" pts you need to close the point list, if you say use a rectang you get 4 points but if you look at the list of points you have a "U" I always re-add the last point to the list of points so it becomes closed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent)))))
(setq co-ord (cons (last co-ord) co-ord))&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 10 Dec 2024 23:47:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-selection-defined-by-polyline-doesn-t-always-work/m-p/13204243#M5305</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-12-10T23:47:00Z</dc:date>
    </item>
  </channel>
</rss>

