<?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 filter polylines with ssget &amp;amp; dxf group code in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8205788#M101768</link>
    <description>&lt;P&gt;Cooper&lt;/P&gt;&lt;P&gt;you are right it works, i`m going to test this way in some of drawings that i have. the problem that i had with q select is that some times i put the length but it doesn select anything. and always is with polylines with lines I don,t have any problem.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Aug 2018 05:00:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-08-17T05:00:37Z</dc:date>
    <item>
      <title>how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8162975#M101752</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to filter polylines with an AutoLisp Program. Im trying save some time cleaning drawings. i`m new with Lisp. im triying something like this&amp;nbsp;(ssget "X" '((0 . "LWPOLYLINE")(-4 . "=")(70 . 1))) but i don`t know how to add a range . i`ve already use qselect and filter but those are not enough.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i would really appreciate any help&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jul 2018 04:40:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8162975#M101752</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-29T04:40:45Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8163108#M101753</link>
      <description>Look at Help[F1]&lt;BR /&gt;AND &lt;BR /&gt;&amp;lt;&lt;BR /&gt;=&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Or bitwise AND &lt;BR /&gt;For closed lwpolylines try this&lt;BR /&gt;(ssget "_X"&lt;BR /&gt;'(&lt;BR /&gt;(0 . "LWPOLYLINE")&lt;BR /&gt;(-4 . "&amp;amp;")&lt;BR /&gt;(70 . 1)&lt;BR /&gt;)&lt;BR /&gt;)</description>
      <pubDate>Sun, 29 Jul 2018 09:46:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8163108#M101753</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2018-07-29T09:46:14Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8163305#M101754</link>
      <description>&lt;P&gt;and how can I add the range to the selection im trying this but it doesn work&lt;/P&gt;&lt;P&gt;(ssget "_X"&lt;BR /&gt;'(&lt;BR /&gt;(0 . "LWPOLYLINE")&lt;BR /&gt;(-4 . "&amp;amp;")&lt;BR /&gt;(70 . 1)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(-4 . "&amp;gt;=") i pretend add a selection range between 2.5 and 5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(70 . 2.5)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(-4 . "&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;=")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(70 . 5)&lt;/SPAN&gt;&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jul 2018 15:09:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8163305#M101754</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-29T15:09:58Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8163349#M101755</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to clarify what you mean with: "&lt;SPAN&gt;a selection range between 2.5 and 5&lt;/SPAN&gt;".&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://help.autodesk.com/view/OARX/2019/ENU/?guid=GUID-748FC305-F3F2-4F74-825A-61F04D757A50" target="_blank"&gt;70 group code for LWPOLYLINE&lt;/A&gt; is a flag which can only have 4 values:&lt;/P&gt;
&lt;P&gt;0 =&amp;gt; opened polyline, disabled line type generation&lt;/P&gt;
&lt;P&gt;1 =&amp;gt; closed polyline, disabled line type generation&lt;/P&gt;
&lt;P&gt;128 =&amp;gt; opened polyline, enabled line type generation&lt;/P&gt;
&lt;P&gt;129 (1 + 128) =&amp;gt; closed polyline, enabled line type generation&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jul 2018 16:06:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8163349#M101755</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2018-07-29T16:06:34Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8163532#M101756</link>
      <description>&lt;P&gt;i apologize if i wasn´t enough clear,&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;what i meant with "&lt;/SPAN&gt;&lt;SPAN&gt;a selection range between 2.5 and 5&lt;/SPAN&gt;&lt;SPAN&gt;" i wanted to say that the program should ask for a minimn and maximum length and this will look for all the polylines that have a length that are between this range e.g. 2.6, 3, 4.7.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jul 2018 20:12:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8163532#M101756</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-29T20:12:31Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8163589#M101757</link>
      <description>&lt;P&gt;You cannot filter polylines by length with ssegt and a selection filter.&lt;/P&gt;
&lt;P&gt;You have to iterate through the selection to check for each polyline length.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jul 2018 21:41:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8163589#M101757</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2018-07-29T21:41:33Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8166526#M101758</link>
      <description>&lt;P&gt;i thoght it was going to be easier, do you have a little program that i could use as an example??&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 02:45:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8166526#M101758</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-31T02:45:22Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8192075#M101759</link>
      <description>&lt;P&gt;I don't have code as such, but I feel it helps to put what you want into a format with steps. so for this task:&lt;/P&gt;&lt;P&gt;1)&amp;nbsp; use SSGET to grab the lw polylines in the drawing&lt;/P&gt;&lt;P&gt;2) convert your selection set to a list of entities for processing &amp;lt;- you might not need this step, but selection sets confuse me...&lt;/P&gt;&lt;P&gt;3)&amp;nbsp;FOREACH&amp;nbsp;entity, get the length of&amp;nbsp;the polyline (possibly by grabbing the DXF 10 out of the entity and doing math)&lt;/P&gt;&lt;P&gt;3a)&amp;nbsp;&amp;nbsp;IF the length is too small, delete the entity (possibly use ENTDEL), else move on&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 16:15:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8192075#M101759</guid>
      <dc:creator>Jonathan.Trostad</dc:creator>
      <dc:date>2018-08-10T16:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8192145#M101760</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;. i`ve already use qselect and filter but those are not enough.&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;the program should ask for a minimn and maximum length and this will look for all the polylines that have a length that are between this range e.g. 2.6, 3, 4.7.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;QSELECT is enough, without the need to define a routine -- you just need to do it in 2 stages:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PLlengthrange1.PNG" style="width: 259px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/533535i86C97C001723E717/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PLlengthrange1.PNG" alt="PLlengthrange1.PNG" /&gt;&lt;/span&gt;&amp;nbsp; and then &amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PLlengthrange2.PNG" style="width: 256px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/533536i1EF961AD6EF3A234/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PLlengthrange2.PNG" alt="PLlengthrange2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 16:47:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8192145#M101760</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-10T16:47:42Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8193358#M101761</link>
      <description>&lt;P&gt;Here's a little function to 'post-filter' a selection set. It works with all entities that have a Length property.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun filterByLength (selectionSet minLength maxLength / i e l)
  (repeat (setq i (sslength selectionSet))
    (setq e (ssname selectionSet (setq i (1- i)))
          l (vl-catch-all-apply 'getpropertyvalue (list e "Length"))
    )
    (if
      (or
        (vl-catch-all-error-p l)
        (and minLength (&amp;lt; l minLength))
        (and maxLength (&amp;lt; maxLength l))
      )
       (ssdel e selectionSet)
    )
  )
  selectionSet
)&lt;/PRE&gt;
&lt;P&gt;To filter LWPOLYLINE entities in the 2.5-5.0 range:&lt;/P&gt;
&lt;PRE&gt;(filterByLength (ssget "_X" '((0 . "LWPOLYLINE"))) 2.5 5.)&lt;/PRE&gt;
&lt;P&gt;To filter LINE entities greater than 2.5&lt;/P&gt;
&lt;PRE&gt;(filterByLength (ssget "_X" '((0 . "LINE"))) 2.5 nil)&lt;/PRE&gt;
&lt;P&gt;To filter lines and any type of polylines lower than 2.5&lt;/P&gt;
&lt;PRE&gt;(filterByLength (ssget "_X" '((0 . "LINE,*POLYLINE"))) nil, 2.5)&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Aug 2018 13:59:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8193358#M101761</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2018-08-11T13:59:32Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8203787#M101762</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3372939"&gt;@Jonathan.Trostad&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I don't have code as such, but I feel it helps to put what you want into a format with steps. so for this task:&lt;/P&gt;&lt;P&gt;1)&amp;nbsp; use SSGET to grab the lw polylines in the drawing&lt;/P&gt;&lt;P&gt;2) convert your selection set to a list of entities for processing &amp;lt;- you might not need this step, but selection sets confuse me...&lt;/P&gt;&lt;P&gt;3)&amp;nbsp;FOREACH&amp;nbsp;entity, get the length of&amp;nbsp;the polyline (possibly by grabbing the DXF 10 out of the entity and doing math)&lt;/P&gt;&lt;P&gt;3a)&amp;nbsp;&amp;nbsp;IF the length is too small, delete the entity (possibly use ENTDEL), else move on&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;As for your point 2) : You do indeed &lt;EM&gt;not&lt;/EM&gt; need that step.&lt;/P&gt;&lt;P&gt;A selectionset IS a list of entities (for processing), so no need for conversion.&lt;/P&gt;&lt;P&gt;You should keep in mind that such a set only contains a reference to the entities, not the entities data (DXF groupcodes &amp;amp; values). To get to the data, its better to combine it with the FOREACH of point 3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To explain:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;(setq ss (&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2015/ENU/AutoCAD-AutoLISP/files/GUID-0F37CC5E-1559-4011-B8CF-A3BA0973B2C3-htm.html" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;ssget&lt;/FONT&gt;&lt;/A&gt; "X" (list '(0 . "LWPOLYLINE"))))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;This will create a list (selection set) containing ALL lwpolyline entities found within the entire database of acad (that's what the "X" is for) and store it with the variable "ss"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since acad handles selection sets as different from lists (although they are basically the same) you can not use functions for lists on selection sets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So,&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;(foreach ent ss&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; ; do stuff&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Works only if ss where a list, but not when its a selection set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead you need to step thru the selection set by 'entry id' (the nth&amp;nbsp;entry of the set)&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;(setq i 0)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;(while (&amp;lt; i (&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-AutoLISP/files/GUID-034B9EC8-0945-48A0-802A-9725DDBA0EF2-htm.html" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;sslength&lt;/FONT&gt;&lt;/A&gt; ss))&lt;/FONT&gt; ; keep going as long as "i" is smaller as the number of selected items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;FONT face="courier new,courier"&gt;(setq ent (&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2015/ENU/AutoCAD-AutoLISP/files/GUID-12540DAE-C84B-4BDB-AEEC-DDFE5BE3C42A-htm.html" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;entget&lt;/FONT&gt;&lt;/A&gt; (&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-AutoLISP/files/GUID-EFB83751-9AC5-4C52-AD3D-D971BC560C15-htm.html" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;ssname&lt;/FONT&gt;&lt;/A&gt; ss i)))&lt;/FONT&gt; ; retrieve entity data for entry "i" (0 is first, 1 is second !!!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;ssname&lt;/FONT&gt; function will retrieve the entities name from the selectionset.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;entget&lt;/FONT&gt; retrieves the data (for a given entity name)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now you have the entities data stored inside "ent", as a list! (a dotted pair / association list)&lt;/P&gt;&lt;P&gt;From here you can retrieve the values for each DXF groupcode, or change them (using &lt;FONT face="courier new,courier"&gt;entmod&lt;/FONT&gt;)&lt;/P&gt;&lt;P&gt;This includes retrieving the length.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;FONT face="courier new,courier"&gt;(setq entLength (&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2015/ENU/AutoCAD-AutoLISP/files/GUID-F9CD8FF3-022A-4323-BAE7-390174451537-htm.html" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;cdr&lt;/FONT&gt;&lt;/A&gt; (&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-AutoLISP/files/GUID-46309786-DAF6-4C28-8448-599FBC8A4F6A-htm.html" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;assoc&lt;/FONT&gt;&lt;/A&gt; 10 ent)))&lt;/FONT&gt; ; this will retrieve the value for DXF group code 10. (as each entry is a dotted pair list (key . value), you need &lt;FONT face="courier new,courier"&gt;cdr&lt;/FONT&gt; to retrieve the value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier"&gt; (setq i (1+ i))&lt;/FONT&gt; ; up the counter, for next entry&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;)&lt;/FONT&gt; ; end while&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check the links for more info on each function and how it works.&amp;nbsp;For a complete list of selectionset functions,&amp;nbsp;check the: &lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-AutoLISP/files/GUID-43715289-5715-4F96-8D48-3169FA26777A-htm.html" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;Selection Set Manipulation Functions Reference.&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps (if even a little) to understand how to work with selection sets, as its realy one of the most powerfull (&amp;amp; most used) parts of AutoLISP.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 12:11:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8203787#M101762</guid>
      <dc:creator>roland.r71</dc:creator>
      <dc:date>2018-08-16T12:11:03Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8204683#M101763</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4682962"&gt;@roland.r71&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3372939"&gt;@Jonathan.Trostad&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;3)&amp;nbsp;FOREACH&amp;nbsp;entity, get the length of&amp;nbsp;the polyline (possibly by grabbing the DXF 10 out of the entity and doing math)&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;FONT face="courier new,courier"&gt;(setq ent (&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2015/ENU/AutoCAD-AutoLISP/files/GUID-12540DAE-C84B-4BDB-AEEC-DDFE5BE3C42A-htm.html" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;entget&lt;/FONT&gt;&lt;/A&gt; (&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-AutoLISP/files/GUID-EFB83751-9AC5-4C52-AD3D-D971BC560C15-htm.html" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;ssname&lt;/FONT&gt;&lt;/A&gt; ss i)))&lt;/FONT&gt; ; retrieve entity data for entry "i" (0 is first, 1 is second !!!)&lt;/P&gt;
&lt;P&gt;....&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From here you can retrieve the values for each DXF groupcode....&lt;/P&gt;
&lt;P&gt;This includes retrieving the length.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;FONT face="courier new,courier"&gt;(setq entLength (&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2015/ENU/AutoCAD-AutoLISP/files/GUID-F9CD8FF3-022A-4323-BAE7-390174451537-htm.html" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;cdr&lt;/FONT&gt;&lt;/A&gt; (&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-AutoLISP/files/GUID-46309786-DAF6-4C28-8448-599FBC8A4F6A-htm.html" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;assoc&lt;/FONT&gt;&lt;/A&gt; 10 ent)))&lt;/FONT&gt; ; this will retrieve the value for DXF group code 10. ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Watch out!&amp;nbsp; &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3372939"&gt;@Jonathan.Trostad&lt;/a&gt;&amp;nbsp;should have talked about getting &lt;EM&gt;all&lt;/EM&gt;&amp;nbsp; the DXF 10&amp;nbsp;entrie&lt;STRONG&gt;s&lt;/STRONG&gt; [plural]&amp;nbsp;out of the entity data list and doing math [which, if they're thinking about adding up distances between vertices, wouldn't give an accurate result if there are arc segments involved], but &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4682962"&gt;@roland.r71&lt;/a&gt;&amp;nbsp;seems to have been misled by the actual wording into thinking that DXF 10 holds the length of a LWPolyline.&amp;nbsp; It does not, any more than DXF 70 was apparently assumed to, back in Message 3!&amp;nbsp;&amp;nbsp;Getting the content from DXF 10 [or, in AutoLisp extracting-information format, (cdr (assoc 10 ent)) ]&amp;nbsp;will get you only the coordinates of the location of the first vertex.&amp;nbsp; If &lt;EM&gt;any&lt;/EM&gt;&amp;nbsp; DXF entry in entity data stored the &lt;EM&gt;length&lt;/EM&gt;, the OP's task would be considerably easier [it could be filtered for in (ssget)], but none does.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't need to extract the entity data list from the entities in the selection set for what the OP wants to do.&amp;nbsp; You do need to step through the set, but you can get the length of each without pulling its entity data list.&amp;nbsp; Carrying on from parts of &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4682962"&gt;@roland.r71&lt;/a&gt;'s sequence of events:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(setq&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ename (ssname ss i)&lt;FONT color="#999999"&gt;&lt;EM&gt;; just the entity, not the entity data list&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; elength (vlax-curve-getDistAtParam ename (vlax-curve-getEndParam ename))&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then elength can be compared to the desired range, and something done with ename depending on the result [removed from the selection set, or put into a&amp;nbsp;different&amp;nbsp;one, or deleted, or moved to a special Layer, or whatever].&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 16:51:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8204683#M101763</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-16T16:51:56Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8204866#M101764</link>
      <description>&lt;P&gt;Yeah, good point.&lt;/P&gt;&lt;P&gt;Although I'm actually fully aware that you can't retrieve the total length for a lwpolyline that easily, my goal was to explain the basics of working with a selection set using the forementioned DXF code, and failed to adress the fact that for the given case, getting to the lwpolyline length, this wouldn't actually work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I kinda misled everyone, including myself, by focussing on the 'how to work with selection sets', neglecting the actual issue from the OP. &lt;img id="smileyembarrassed" class="emoticon emoticon-smileyembarrassed" src="https://forums.autodesk.com/i/smilies/16x16_smiley-embarrassed.png" alt="Smiley Embarassed" title="Smiley Embarassed" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 17:56:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8204866#M101764</guid>
      <dc:creator>roland.r71</dc:creator>
      <dc:date>2018-08-16T17:56:21Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8205587#M101765</link>
      <description>&lt;P&gt;Oh, cut it out.&amp;nbsp; Your message was clear, and I'm sure the OP learned a lot from it.&lt;/P&gt;&lt;P&gt;Kent just tends to be "the closer."&amp;nbsp; God bless him.&lt;/P&gt;&lt;P&gt;Though it strikes me that he must be independently wealthy to have such free time.&lt;/P&gt;&lt;P&gt;Even though I cooked dinner and it's keeping warm in the oven, I am being yelled at right now.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;They tell me I should have a hobby.&amp;nbsp; Umm, er, I thought this was.&amp;nbsp; But I think the hobby is supposed to be weeding the gardens &amp;lt;yech&amp;gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 00:24:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8205587#M101765</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-08-17T00:24:47Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8205769#M101766</link>
      <description>&lt;P&gt;I really aprecciate this explaination since im starting with autolisp this is very helpful im going to try to build the code in this way&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 04:41:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8205769#M101766</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-17T04:41:11Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8205774#M101767</link>
      <description>&lt;P&gt;I really apreciate this example but I can`t make it work, should I run the funtion from the command prompt ?&lt;/P&gt;&lt;P&gt;and after place the selection set&amp;nbsp;(filterByLength (ssget "_X" '((0 . "LINE,*POLYLINE"))) nil, 2.5).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think i need more experience with this&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 04:46:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8205774#M101767</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-17T04:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8205788#M101768</link>
      <description>&lt;P&gt;Cooper&lt;/P&gt;&lt;P&gt;you are right it works, i`m going to test this way in some of drawings that i have. the problem that i had with q select is that some times i put the length but it doesn select anything. and always is with polylines with lines I don,t have any problem.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 05:00:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8205788#M101768</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-17T05:00:37Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8205933#M101769</link>
      <description>&lt;P&gt;In the OP, you said: "im triying something like this&amp;nbsp;(ssget "X" '((0 . "LWPOLYLINE")(-4 . "=")(70 . 1)))"&lt;/P&gt;
&lt;P&gt;So while the 'filterByLength' routine is loaded, in your code you replace&lt;/P&gt;
&lt;PRE&gt;(ssget "X" '((0 . "LWPOLYLINE")))&lt;/PRE&gt;
&lt;P&gt;with something like this&lt;/P&gt;
&lt;PRE&gt;(filterByLength (ssget "_X" '((0 . "LWPOLYLINE"))) 2.5 5.0)&lt;/PRE&gt;
&lt;P&gt;If you want to simply highlight the selection, always after having loaded filterByLength routine, paste the following expression in the command line:&lt;/P&gt;
&lt;PRE&gt;(sssetfirst nil (filterByLength (ssget "_X" '((0 . "LWPOLYLINE"))) 2.5 5.0))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 06:54:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8205933#M101769</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2018-08-17T06:54:16Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget &amp; dxf group code</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8206697#M101770</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4682962"&gt;@roland.r71&lt;/a&gt;&amp;nbsp;I would argue that your explanation of why I don't need step 2 is actually how I would accomplish step 2. You did convert the selection set to a list.&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;You are right. My thought was to measure point to point distances. I had not considered curves. As per typical you seem to think these things out a bit better than most.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 13:37:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8206697#M101770</guid>
      <dc:creator>Jonathan.Trostad</dc:creator>
      <dc:date>2018-08-17T13:37:48Z</dc:date>
    </item>
    <item>
      <title>Betreff: how to filter polylines with ssget</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8206714#M101771</link>
      <description>IMHO, converting a selection set to a list is handy for sorting or using&lt;BR /&gt;mapcar.</description>
      <pubDate>Fri, 17 Aug 2018 13:45:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-filter-polylines-with-ssget-amp-dxf-group-code/m-p/8206714#M101771</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-08-17T13:45:22Z</dc:date>
    </item>
  </channel>
</rss>

