<?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: Is it possible to covert a line to a spline? in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/6869795#M243527</link>
    <description>&lt;P&gt;I would use PEDIT to make a polyline out of your Lines and Arcs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't see the use of a Spline from what I read.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PEDIT&lt;/P&gt;&lt;P&gt;&amp;nbsp; - Multiple&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - Select your lines and arcs&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Join&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I find pline a lot easier to work with than spline.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again,&amp;nbsp;&lt;/P&gt;&lt;P&gt;just a suggestion&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2017 18:25:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-02-10T18:25:32Z</dc:date>
    <item>
      <title>Is it possible to covert a line to a spline?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/6814149#M243523</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let me explain my current situation. My work is running a copy of AutoCAD 2010 that we do some our wire diagrams on. Unfortunately, we sometimes have to use them in another program that doesn't not support the file type &lt;SPAN&gt;AutoCAD&lt;/SPAN&gt; uses. After losing about 2 hours of work today due to a corrupted save, I just started trying to&amp;nbsp;find a creative way around the importing display issue. What I found was odd.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Most of our diagrams were drawn using lines, and when imported where scaled up and out of proportion (not&amp;nbsp;&lt;SPAN&gt;AutoCAD's fault). Whats weird is that i discovered that some of our files were drawn using splines, and that these imported over almost perfectly.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Actual Question&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there a way to convert a line and arc into a spline? If so, is it possible to do it utilizing&amp;nbsp;multiple selected objects?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 17:31:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/6814149#M243523</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-18T17:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to covert a line to a spline?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/6814917#M243524</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;Is there a way to convert a line and arc into a spline? If so, is it possible to do it utilizing&amp;nbsp;multiple selected objects?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A routine could easily be written that would take all selected &lt;EM&gt;Line&lt;/EM&gt; objects and draw two-point Splines over them, and get rid of the Lines if you like.&amp;nbsp; &lt;EM&gt;Arcs&lt;/EM&gt; are another matter....&amp;nbsp; Drawing a Spline using the ends and midpoint of an Arc doesn't result in an arc-shaped Spline.&amp;nbsp; If you draw a Spline that meets an Arc at one end, and use Join to connect them together, then Break the original Spline part off, you end up with a Spline in the shape of the Arc [within certain tolerances, I suppose].&amp;nbsp; I don't know of a way to just &lt;EM&gt;convert&lt;/EM&gt; an Arc into a Spline&amp;nbsp;[the way you can convert one into a Polyline] without&amp;nbsp;Joining it to a Spline like that as an intermediate step.&amp;nbsp; Automating that might be possible, but could be tricky.&amp;nbsp; I don't know how a Spline gets itself into a good arc shape, so it's hard to say whether some kind of calculations could be done from the Arc, and a Spline drawn using the results.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 22:35:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/6814917#M243524</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-01-18T22:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to covert a line to a spline?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/6818451#M243525</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; wrote:&lt;BR /&gt;
&lt;P&gt;A routine could easily be written that would take all selected &lt;EM&gt;Line&lt;/EM&gt; objects and draw two-point Splines over them, and get rid of the Lines if you like.&amp;nbsp; &lt;EM&gt;...&lt;/EM&gt;.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Like this, for instance:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:L2S (/ ss lin ldata); = Line(s) [to] Spline(s)
  (prompt "\nTo convert Line(s) to Spline(s),")
  (if (setq ss (ssget '((0 . "LINE"))))
    (repeat (setq n (sslength ss))
      (setq
        lin (ssname ss (setq n (1- n)))
        ldata (entget lin)
      ); setq
      (command
        "_.spline" "_none" (cdr (assoc 10 ldata)) "_none" (cdr (assoc 11 ldata)) "" "" ""
        "_.erase" lin ""
      ); command
    ); repeat
  ); if
  (princ)
); defun&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jan 2017 03:56:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/6818451#M243525</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-01-20T03:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to covert a line to a spline?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/6821958#M243526</link>
      <description>&lt;P&gt;Did any of the posts in the thread help with you issue? &lt;BR /&gt;&lt;BR /&gt;Post back in the thread if you are still having an issue with AutoCAD I'm sure the community will be more than happy to help. &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2017 20:55:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/6821958#M243526</guid>
      <dc:creator>Emmsleys</dc:creator>
      <dc:date>2017-01-21T20:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to covert a line to a spline?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/6869795#M243527</link>
      <description>&lt;P&gt;I would use PEDIT to make a polyline out of your Lines and Arcs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't see the use of a Spline from what I read.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PEDIT&lt;/P&gt;&lt;P&gt;&amp;nbsp; - Multiple&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - Select your lines and arcs&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Join&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I find pline a lot easier to work with than spline.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again,&amp;nbsp;&lt;/P&gt;&lt;P&gt;just a suggestion&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 18:25:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/6869795#M243527</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-10T18:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to covert a line to a spline?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/8537377#M243528</link>
      <description>&lt;P&gt;The best way in my opinion is to use command "join" to make a polyline of your lines. Then type command "pedit"; press enter; type "Spline"; press enter;&lt;BR /&gt;&lt;BR /&gt;This should do the trick.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 13:06:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/8537377#M243528</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-21T13:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to covert a line to a spline?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/8537697#M243529</link>
      <description>&lt;P&gt;Convert the lines/arcs to polylines (using PEDIT), then try the attached LISP. (I grabbed it somewhere in the web, a lot of thanks to the unknown author)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cadder&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;;;; Convert PL to SPline. 



(defun C:PL2SPL ( / ss i acc)
  (vl-load-com)
  (initget (+ 1 2 4))
  (setq acc (getint "\nPrecision: "))
  (if
    (setq ss (ssget '((0 . "*POLYLINE"))))
    (repeat (setq i (sslength ss))
      (make_spline
        (pl_list (ssname ss (setq i (1- i))))
      )
    )
  )
  (princ)
)

(defun pl_list (e / r i j lg)
 (setq lg (* 0.05 (vlax-curve-getdistatparam e (vlax-curve-getendparam e))))  
  
  (repeat (setq i (1+ (fix (vlax-curve-getEndParam e))))
    (setq r (cons (cons 11 (vlax-curve-GetPointAtParam e (setq i (1- i)))) r))
    (if
      (and
        (&amp;gt; i 0)
        (&amp;gt; (- (vlax-curve-getdistatparam e i) (vlax-curve-getdistatparam e (1- i))) lg)
        )
      (repeat (setq j (1- acc))
        (setq r (cons (cons 11 (vlax-curve-GetPointAtParam e (+ (1- i) (* (/ 1.0 acc) j)))) r)
              j (1- j)
              )
        )
      )
    )
  r
)

(defun make_spline (l)
  (entmake
    (append
      (list
        '(0 . "SPLINE")
        '(100 . "AcDbEntity")
        '(100 . "AcDbSpline")
        '(70 . 1)
        '(71 . 3)
        (cons 74 (length l))
        '(44 . 1.0e-005)
      )
      l
    )
  )
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 14:54:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/is-it-possible-to-covert-a-line-to-a-spline/m-p/8537697#M243529</guid>
      <dc:creator>j.palmeL29YX</dc:creator>
      <dc:date>2019-01-21T14:54:21Z</dc:date>
    </item>
  </channel>
</rss>

