<?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: list the length of all segments of a polyline in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/11236061#M112642</link>
    <description>&lt;P&gt;yes message 9&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jun 2022 07:57:34 GMT</pubDate>
    <dc:creator>sameerulcdc</dc:creator>
    <dc:date>2022-06-15T07:57:34Z</dc:date>
    <item>
      <title>list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7506972#M112622</link>
      <description>&lt;P&gt;sir,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can I get a lisp programme for getting the segment length of all the segments of a polyline. a sampe polyline is attached&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 05:47:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7506972#M112622</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-01T05:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7507060#M112623</link>
      <description>&lt;P&gt;You already could get the length from the properties, but if you need to do it with LISP see example code below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:Test (/ T_Entity T_Object)
   (if
      (and
         (setq T_Entity (car (entsel "\nSelect polyline: ")))
         (= (vla-get-ObjectName (setq T_Object (vlax-ename-&amp;gt;vla-object T_Entity))) "AcDbPolyline")
      )
      (princ (strcat "\nPolyline length is " (rtos (vla-get-Length T_Object))))
      (princ "\n ** Nothing selected or not a polyline.")
   )
   (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Nov 2017 07:02:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7507060#M112623</guid>
      <dc:creator>DannyNL</dc:creator>
      <dc:date>2017-11-01T07:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7507085#M112624</link>
      <description>&lt;P&gt;sir&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the segment wise length of the polyline, which means if a polyline consists of 4 segments and length of the segments are 2, 5, 7 and 8. then the programme should list the above values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the total length of the polyline would be 22&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 07:19:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7507085#M112624</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-01T07:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7507159#M112625</link>
      <description>&lt;P&gt;Ok, my bad.&lt;/P&gt;&lt;P&gt;See code below, but with your example polyline the list gets pretty long&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:Test (/ T_Entity T_Object T_Start T_End T_SegmentLengths T_Count)
   (if
      (and
         (setq T_Entity (car (entsel "\nSelect polyline: ")))
         (= (vla-get-ObjectName (setq T_Object (vlax-ename-&amp;gt;vla-object T_Entity))) "AcDbPolyline")
      )
      (progn
         (setq T_Start (vlax-curve-getStartParam T_Object))
         (setq T_End   (vlax-curve-getEndParam T_Object))
         (while (&amp;lt; T_Start T_End)
            (setq T_SegmentLengths (append T_SegmentLengths (list (- (vlax-curve-getDistAtParam T_Object (setq T_Start (1+ T_Start))) (vlax-curve-getDistAtParam T_Object (1- T_Start))))))
         )
         (setq T_Count 0)
         (foreach T_Item T_SegmentLengths
            (princ (strcat "\nSegment " (itoa (setq T_Count (1+ T_Count))) ": " (rtos T_Item)))
         )         
         (princ (strcat "\n\n ** Total polyline length is " (rtos (vla-get-Length T_Object))))
      )
      (princ "\n ** Nothing selected or not a polyline.")
   )
   (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Nov 2017 08:02:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7507159#M112625</guid>
      <dc:creator>DannyNL</dc:creator>
      <dc:date>2017-11-01T08:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7507178#M112626</link>
      <description>&lt;P&gt;thanks a lot, it served my purpose.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 08:10:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7507178#M112626</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-01T08:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7507189#M112627</link>
      <description>&lt;P&gt;only thing is I want the value upto 6 digits after decimal&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 08:16:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7507189#M112627</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-01T08:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7507336#M112628</link>
      <description>&lt;P&gt;Glad I could help &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;And no problem, only a small addition to the existing code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:Test (/ T_Entity T_Object T_Start T_End T_SegmentLengths T_Count)
   (if
      (and
         (setq T_Entity (car (entsel "\nSelect polyline: ")))
         (= (vla-get-ObjectName (setq T_Object (vlax-ename-&amp;gt;vla-object T_Entity))) "AcDbPolyline")
      )
      (progn
         (setq T_Start (vlax-curve-getStartParam T_Object))
         (setq T_End   (vlax-curve-getEndParam T_Object))
         (while (&amp;lt; T_Start T_End)
            (setq T_SegmentLengths (append T_SegmentLengths (list (- (vlax-curve-getDistAtParam T_Object (setq T_Start (1+ T_Start))) (vlax-curve-getDistAtParam T_Object (1- T_Start))))))
         )
         (setq T_Count 0)
         (foreach T_Item T_SegmentLengths
            (princ (strcat "\nSegment " (itoa (setq T_Count (1+ T_Count))) ": " &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;(rtos T_Item (getvar "LUNITS") 6)&lt;/FONT&gt;&lt;/STRONG&gt;))
         )         
         (princ (strcat "\n\n ** Total polyline length is " &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;(rtos (vla-get-Length T_Object) (getvar "LUNITS") 6)&lt;/FONT&gt;&lt;/STRONG&gt;))
      )
      (princ "\n ** Nothing selected or not a polyline.")
   )
   (princ)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 09:44:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/7507336#M112628</guid>
      <dc:creator>DannyNL</dc:creator>
      <dc:date>2017-11-01T09:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8189059#M112629</link>
      <description>&lt;P&gt;DannyNL,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you be able to adjust this lisp you made to have all the segment lengths be put into a single column output table so I would be able to export the lengths? I just want the lengths of the individual polyline segments to be input into our spreadsheet. Any help on this would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 14:31:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8189059#M112629</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-09T14:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8189227#M112630</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;have all the segment lengths be put into a single column output table so I would be able to export the lengths? I just want the lengths of the individual polyline segments to be input into our spreadsheet. ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't need the middle-man of a Table to then be exported&amp;nbsp;-- you can&amp;nbsp;send them&amp;nbsp;&lt;EM&gt;directly&lt;/EM&gt;&amp;nbsp; to a spreadsheet file:&lt;/P&gt;
&lt;PRE&gt;(defun C:PSLE (/ pl psle n); = Polyline Segment Lengths Export
  (setq
    pl (car (entsel "\nPolyline for Segment-Length Export: "))
    psle (open "&lt;EM&gt;&lt;FONT color="#33cccc"&gt;C:/PSLE&lt;/FONT&gt;&lt;/EM&gt;.csv" "w")&lt;EM&gt;&lt;FONT color="#33cccc"&gt;; replace with your drive:filepath/filename&lt;/FONT&gt;&lt;/EM&gt;
    n 0
  ); setq
  (repeat (fix (vlax-curve-getEndParam pl))
    (write-line
      (rtos
        (abs
          (-
            (vlax-curve-getDistAtParam pl n)
            (vlax-curve-getDistAtParam pl (setq n (1+ n)))
          ); -
        ); abs
        2 6
      ); rtos
      psle
    ); write-line
  ); repeat
  (close psle)
); defun&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Aug 2018 15:24:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8189227#M112630</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-09T15:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8189555#M112631</link>
      <description>&lt;P&gt;Kent1Cooper,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you that worked well. I got sent a spreadsheet that is looking for a little more information to be exported. Would you be able to modify it to be able to get all of the columns in the attached word document filled?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 17:50:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8189555#M112631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-09T17:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8189750#M112632</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;modify it to be able to get all of the columns in the attached word document filled? ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not without some more information about what those categories need in them.&amp;nbsp; But you can probably work it out from this start.&amp;nbsp; It assumes sequential numbering for the Feeder ID, and uses the cumulative distance along the overall Polyline at the vertices for the "Run Start" and "Run End" for each segment, but that's also just an assumption -- maybe you need a location or something.&amp;nbsp; I had no idea what to assume about the # of Turbines, but maybe you can figure out what to put there instead of my "whatever".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:PSLE (/ pl psle n); = Polyline Segment Lengths Export
  (setq
    pl (car (entsel "\nPolyline for Segment-Length Export: "))
    psle (open "C:/PSLE.csv" "w")
    n 0
  ); setq
  (write-line "Feeder" psle)&lt;EM&gt;&lt;FONT color="#00ccff"&gt;; top line&lt;/FONT&gt;&lt;/EM&gt;
  (write-line "ID,Run Start,Run End,Length,# of Turbines" psle)&lt;EM&gt;&lt;FONT color="#00ccff"&gt;; headings&lt;/FONT&gt;&lt;/EM&gt;
  (repeat (fix (vlax-curve-getEndParam pl))
    (write-line
      (strcat
        (itoa (1+ n)) "," &lt;EM&gt;&lt;FONT color="#00ccff"&gt;; ID&lt;/FONT&gt;&lt;/EM&gt;
        (rtos (vlax-curve-getDistAtParam pl n) 2 6) "," &lt;EM&gt;&lt;FONT color="#00ccff"&gt;; Run Start&lt;/FONT&gt;&lt;/EM&gt;
        (rtos (vlax-curve-getDistAtParam pl (1+ n)) 2 6) "," &lt;EM&gt;&lt;FONT color="#00ccff"&gt;; Run End&lt;/FONT&gt;&lt;/EM&gt;
        (rtos &lt;EM&gt;&lt;FONT color="#00ccff"&gt;; Length&lt;/FONT&gt;&lt;/EM&gt;
          (abs
            (-
              (vlax-curve-getDistAtParam pl n)
              (vlax-curve-getDistAtParam pl (setq n (1+ n)))
            ); -
          ); abs
          2 6
        ); rtos
        ","
        "whatever" &lt;EM&gt;&lt;FONT color="#00ccff"&gt;; # of Turbines&lt;/FONT&gt;&lt;/EM&gt;
      ); strcat
      psle
    ); write-line
  ); repeat
  (close psle)
); defun&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 19:10:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8189750#M112632</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-09T19:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8202286#M112633</link>
      <description>&lt;P&gt;Kent1Cooper,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you use the lisp to export the values into the spreadsheet we have developed? I seem to not have found a way to do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 20:06:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8202286#M112633</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-15T20:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8222213#M112634</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you use the lisp to export the values into the spreadsheet we have developed?&amp;nbsp;&lt;/P&gt;
….&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Will using the (open) function with the &lt;FONT color="#0000ff"&gt;&lt;STRONG&gt;a&lt;/STRONG&gt;&lt;/FONT&gt;ppend option [instead of the &lt;FONT color="#800080"&gt;&lt;STRONG&gt;w&lt;/STRONG&gt;&lt;/FONT&gt;rite option] do it for you?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 11:28:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8222213#M112634</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-24T11:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8222481#M112635</link>
      <description>&lt;P&gt;Kent1Cooper,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That doesn't seem to allow me to open the table with that.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 13:16:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8222481#M112635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-24T13:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8222901#M112636</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... That doesn't seem to allow me to open the table with that.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;[Sorry, but I never have a need to deal with relating to external files of other types in AutoCAD.&amp;nbsp; I know enough to write to a .CSV file,&amp;nbsp;and to read from pretty simple files like those and in plain text, but that's about it -- I don't know enough about things like data extraction or tables.&amp;nbsp; I hope someone else with experience doing such things can help.]&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 15:33:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/8222901#M112636</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-24T15:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/11233564#M112637</link>
      <description>&lt;P&gt;hi this lsp is working good&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;please can u update to select multiple line&amp;nbsp; in one time&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 09:26:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/11233564#M112637</guid>
      <dc:creator>sameerulcdc</dc:creator>
      <dc:date>2022-06-14T09:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/11233817#M112638</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12554031"&gt;@sameerulcdc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... please can u update to select multiple line&amp;nbsp; in one time&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And what would be the delimiter between the reporting on each Polyline?&amp;nbsp; Simply starting the ID numbers over again at 1?&amp;nbsp; An empty line?&amp;nbsp; Some kind of item header such as the Handle?&amp;nbsp; Something else?&amp;nbsp; A small sample file with the format you would expect [with only a few Polylines' worth] would answer all questions.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 11:27:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/11233817#M112638</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2022-06-14T11:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/11234277#M112639</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;like this format please&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 14:29:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/11234277#M112639</guid>
      <dc:creator>sameerulcdc</dc:creator>
      <dc:date>2022-06-14T14:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/11234620#M112640</link>
      <description>&lt;P&gt;A possible way...&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:dist-vtx2CSV ( / js prec tmp f_open str_sep l_pt oldim n ent pr lst_len dist_start dist_end seg_len)
  (princ "\nSelect polyline")
  (setq js
    (ssget
      (list
        '(0 . "LWPOLYLINE")
        (cons 67 (if (eq (getvar "CVPORT") 1) 1 0))
        (cons 410 (if (eq (getvar "CVPORT") 1) (getvar "CTAB") "Model"))
      )
    )
  )
  (cond
    (js
      (initget 4)
      (setq
        prec (getint (strcat "\nNumber of digits? &amp;lt;" (itoa (getvar "LUPREC")) "&amp;gt;: "))
        tmp (vl-filename-mktemp "tmp.csv")
        f_open (open tmp "w")
        str_sep ";"
        oldim (getvar "dimzin")
        n -1
      )
      (if (not prec) (setq prec (getvar "LUPREC")))
      (setvar "dimzin" 0)
      (repeat (sslength js)
        (setq
          ent (ssname js (setq n (1+ n)))
          pr -1
          lst_len nil
        )
        (repeat (fix (vlax-curve-getEndParam ent))
          (setq
            dist_start (vlax-curve-GetDistAtParam ent (setq pr (1+ pr)))
            dist_end (vlax-curve-GetDistAtParam ent (1+ pr))
            seg_len (- dist_end dist_start)
            lst_len (cons seg_len lst_len)
          )
        )
        (write-line (strcat (itoa n) str_sep (apply 'strcat (mapcar '(lambda (x) (strcat (rtos x 2 prec) str_sep)) (reverse lst_len)))) f_open)
      )
      (close f_open)
      (startapp "notepad" tmp)
      (setvar "dimzin" oldim)
    )
  )
  (prin1)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 14 Jun 2022 16:43:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/11234620#M112640</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2022-06-14T16:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: list the length of all segments of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/11234690#M112641</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12554031"&gt;@sameerulcdc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;like this format please&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That looks like you're after a modification of the routine at Message 9, not Message 11.&amp;nbsp; Is that right?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 17:15:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-the-length-of-all-segments-of-a-polyline/m-p/11234690#M112641</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2022-06-14T17:15:47Z</dc:date>
    </item>
  </channel>
</rss>

