<?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: Create a spline through the ends of a polyline in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-spline-through-the-ends-of-a-polyline/m-p/12415036#M20999</link>
    <description>&lt;P&gt;That may not be too difficult, but questions arise [Message 2 will work only with certain answers assumed]:&lt;/P&gt;
&lt;P&gt;Are the Polylines always vertical, or might they run at different angles?&amp;nbsp; If at different angles, are they always parallel like these, or might they sometimes be at different angles from each other?&lt;/P&gt;
&lt;P&gt;This might matter less than some other questions, but are they always straight?&lt;/P&gt;
&lt;P&gt;Are they always drawn in the same direction, or might some be drawn from bottom to top and others from top to bottom?&amp;nbsp; [If not always vertical but always parallel, some in opposite directions from each other?]&lt;/P&gt;
&lt;P&gt;Again if always vertical, would you always need the top ends, or sometimes the bottom?&amp;nbsp; If angles vary, what would be the criteria for which end to use?&lt;/P&gt;
&lt;P&gt;What's different about the Polyline on the left, with the pull-down pointer thingie?&amp;nbsp; Would that difference make any difference to such a routine?&lt;/P&gt;
&lt;P&gt;An ordinary SPLINE command with ENDpoint Object Snap running would do this about as quickly as a custom routine [and you could do a lot of them in the time it would take to come up with such a routine] -- can you elaborate on the need?&lt;/P&gt;</description>
    <pubDate>Sat, 02 Dec 2023 13:04:42 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2023-12-02T13:04:42Z</dc:date>
    <item>
      <title>Create a spline through the ends of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-spline-through-the-ends-of-a-polyline/m-p/12414966#M20997</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to select several polylines and create&amp;nbsp;a spline through the ends of a polylines as shown below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you by advance for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="malmal02122023_0-1701516203590.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1299937i8221D5F3530F7929/image-size/medium?v=v2&amp;amp;px=400" role="button" title="malmal02122023_0-1701516203590.png" alt="malmal02122023_0-1701516203590.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2023 11:27:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-spline-through-the-ends-of-a-polyline/m-p/12414966#M20997</guid>
      <dc:creator>malmal02122023</dc:creator>
      <dc:date>2023-12-02T11:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create a spline through the ends of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-spline-through-the-ends-of-a-polyline/m-p/12415033#M20998</link>
      <description>&lt;P&gt;Possibly like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)

(defun c:splinends ( / l)
  
  (if (and (setq l (ssget '((0 . "LWPOLYLINE"))))
	   (setq l (vl-remove-if 'listp (mapcar 'cadr (ssnamex l))))
	   (setq l (mapcar 'vlax-curve-getendpoint l))
	   (setq l (vl-sort l '(lambda (e1 e2) (&amp;lt; (car e1) (car e2)))))
	   )
    (progn
      (initcommandversion)
      (command "_.spline")
      (foreach p l (command "_non" (trans p 0 1)))
      (command "")))
  (princ)
  )
&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Dec 2023 12:55:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-spline-through-the-ends-of-a-polyline/m-p/12415033#M20998</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-12-02T12:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create a spline through the ends of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-spline-through-the-ends-of-a-polyline/m-p/12415036#M20999</link>
      <description>&lt;P&gt;That may not be too difficult, but questions arise [Message 2 will work only with certain answers assumed]:&lt;/P&gt;
&lt;P&gt;Are the Polylines always vertical, or might they run at different angles?&amp;nbsp; If at different angles, are they always parallel like these, or might they sometimes be at different angles from each other?&lt;/P&gt;
&lt;P&gt;This might matter less than some other questions, but are they always straight?&lt;/P&gt;
&lt;P&gt;Are they always drawn in the same direction, or might some be drawn from bottom to top and others from top to bottom?&amp;nbsp; [If not always vertical but always parallel, some in opposite directions from each other?]&lt;/P&gt;
&lt;P&gt;Again if always vertical, would you always need the top ends, or sometimes the bottom?&amp;nbsp; If angles vary, what would be the criteria for which end to use?&lt;/P&gt;
&lt;P&gt;What's different about the Polyline on the left, with the pull-down pointer thingie?&amp;nbsp; Would that difference make any difference to such a routine?&lt;/P&gt;
&lt;P&gt;An ordinary SPLINE command with ENDpoint Object Snap running would do this about as quickly as a custom routine [and you could do a lot of them in the time it would take to come up with such a routine] -- can you elaborate on the need?&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2023 13:04:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-spline-through-the-ends-of-a-polyline/m-p/12415036#M20999</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-12-02T13:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create a spline through the ends of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-spline-through-the-ends-of-a-polyline/m-p/12415051#M21000</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;...&amp;nbsp;Polyline on the left, with the &lt;STRONG&gt;pull-down pointer&lt;/STRONG&gt; thingie?&amp;nbsp;....&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That belongs to the spline.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2023 13:15:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-spline-through-the-ends-of-a-polyline/m-p/12415051#M21000</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-12-02T13:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create a spline through the ends of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-spline-through-the-ends-of-a-polyline/m-p/12415089#M21001</link>
      <description>&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;It works great for my case with vertical polylines.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2023 13:56:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-spline-through-the-ends-of-a-polyline/m-p/12415089#M21001</guid>
      <dc:creator>malmal02122023</dc:creator>
      <dc:date>2023-12-02T13:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create a spline through the ends of a polyline</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-spline-through-the-ends-of-a-polyline/m-p/12415726#M21002</link>
      <description>&lt;P&gt;Regards&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14815588"&gt;@malmal02122023&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try this code. I hope it meets everything &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;asks. It also works if the polyline was created from top to bottom or upside down.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;;;;___
(defun c:m_sp (/ s i j k l m n px py lpy lpxy)
  (setq	s (ssget '((0 . "lwpolyline")))
  )
  (repeat (setq i (sslength s))
    (setq lp  (mapcar 'cdr
		      (vl-remove-if-not
			'(lambda (x) (= (car x) 10))
			(entget (ssname s (setq i (1- i))))
		      )
	      )
	  py
	      (car (vl-sort lp '(lambda (j k) (&amp;gt; (cadr j) (cadr k)))))
	  lpy
	      (cons py lpy)
    )
  )
  (setq
    lpxy (reverse (vl-sort lpy '(lambda (l m) (&amp;lt; (car l) (car m)))))
  )
  (initcommandversion)
  (command "_.spline")
  (repeat (setq n (length lpxy))
    (command (nth (setq n (1- n)) lpxy))
  )
  (command "")
  (princ)
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2023 01:17:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-spline-through-the-ends-of-a-polyline/m-p/12415726#M21002</guid>
      <dc:creator>calderg1000</dc:creator>
      <dc:date>2023-12-03T01:17:29Z</dc:date>
    </item>
  </channel>
</rss>

