<?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: Simple line break and jump AutoLISP in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10992091#M94273</link>
    <description>&lt;P&gt;I tested it out and it works, but I am having to select the line twice - once for the hop and once for the convert.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Mar 2022 19:42:51 GMT</pubDate>
    <dc:creator>andrew_k</dc:creator>
    <dc:date>2022-03-08T19:42:51Z</dc:date>
    <item>
      <title>Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8520869#M94254</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I created a simple AutoLISP command to speed up creating line breaks and jumps for use in a wiring diagram. The command breaks the selected line and draws an arc to show that the lines do not cross / connect.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 16:21:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8520869#M94254</guid>
      <dc:creator>andrew_k</dc:creator>
      <dc:date>2019-01-14T16:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8520959#M94255</link>
      <description>&lt;P&gt;Good for you for making&amp;nbsp;a start, though it could use some improvements.&amp;nbsp; It assumes only orthogonal Lines.&amp;nbsp; If you choose the vertical one to break, it&amp;nbsp;does break that one, but draws the Arc as though you chose the horizontal one to break.&amp;nbsp; [It also draws the Arc the same way if you&amp;nbsp;pick non-orthogonal Lines.]&amp;nbsp; And it requires you to&amp;nbsp;pick the one to break &lt;EM&gt;inside&lt;/EM&gt;&amp;nbsp; the 1/8-drawing-unit distance from the intersection -- if you pick on it farther away, the wrong part gets broken off.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To see how others have approached this in more comprehensive ways, there are some other threads just on this Forum, such as &lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/intersection-jump/m-p/2372733" target="_blank"&gt;&amp;gt;this one&amp;lt;&lt;/A&gt; and &lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-with-a-lisp-jumping-crossing-lines/m-p/4765525" target="_blank"&gt;&amp;gt;this other one&amp;lt;&lt;/A&gt;, and no doubt others on different websites, available for the Searching.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 16:51:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8520959#M94255</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-01-14T16:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8521019#M94256</link>
      <description>&lt;P&gt;Yes, there still are some things that can be tweaked. I am fairly new to customizing AutoCAD using LISP, this is actually my first custom command using it. I personally know how this function works, so I will use it accordingly, but if you have any suggestions to help fix those issues, I am completely open to hear them.&lt;/P&gt;
&lt;P&gt;Thanks for the reply!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 17:05:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8521019#M94256</guid>
      <dc:creator>andrew_k</dc:creator>
      <dc:date>2019-01-14T17:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8521213#M94257</link>
      <description>&lt;P&gt;Here is another quick to mull over one for polylines. The nice thing here is the segment will stay as one piece :).&lt;/P&gt;
&lt;PRE&gt;(defun c:hop (/ a d e i o p p1 p2 p3)
  ;; RJP » 2019-01-14
  ;; Adds a 'hop' to a lwpolyline ( very little error checking )
  (setq a 0.125)
  (while (and (setq e (entsel "\nPick a polyline to add a hop: "))
	      (= "LWPOLYLINE" (cdr (assoc 0 (entget (car e)))))
	      (setq p (vlax-curve-getclosestpointto (car e) (cadr e)))
	      (setq i (1+ (fix (vlax-curve-getparamatpoint (setq e (car e)) p))))
	      (setq d (vlax-curve-getdistatpoint e p))
	      (setq p1 (vlax-curve-getpointatdist e (+ d a)))
	      (setq p2 (vlax-curve-getpointatdist e (- d a)))
	 )
    (setq o (vlax-ename-&amp;gt;vla-object e))
    (vlax-invoke o 'addvertex i (mapcar '+ p1 '(0 0)))
    (vlax-invoke o 'addvertex i (mapcar '+ p2 '(0 0)))
    (vla-setbulge
      o
      i
      (cond ((&amp;lt; (angle '(0 0) p1) (angle '(0 0) p2)) -1.)
	    (1.)
      )
    )
  )
  (princ)
)
(vl-load-com)&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-01-14_11-03-41.gif" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/590647iB7BA39349B52838E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2019-01-14_11-03-41.gif" alt="2019-01-14_11-03-41.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 18:22:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8521213#M94257</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2019-01-14T18:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8521289#M94258</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4622096"&gt;@andrew_k&lt;/a&gt;&amp;nbsp;hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is how i would do it&lt;/P&gt;
&lt;P&gt;add comments at each line for you to understand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if user fail to supply the right inputs? the (and) function&amp;nbsp;will return nil thus command will exit (just as any AutoCAD standard command).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;enjoy&lt;/P&gt;
&lt;P&gt;moshe&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:LJ2 (/ pick ename c0 c1 c2 c3 ;| local variables |;)
 (setvar "cmdecho" 0)		; disable command echo
 (command "._undo" "_begin")	; start undo group
  
 (if (and
       (setq pick (entsel "\nSelect line to break: "))	; select entity
       (setq ename (car pick))				; get ename
       (eq (cdr (assoc '0 (entget ename))) "LINE")	; make sure it's a line?
       (not (redraw ename 3))				; highlight entity
       (setq c0 (getpoint "\nSpecify intersection: "))	; get intersection
     )
  (progn
   (setq p0 (osnap (cadr pick) "_nearest"))		; make sure the pick is on object
   (setq c1 (polar c0 (angle p0 c0) 0.125))
   (setq c2 (polar c0 (angle c0 p0) 0.125))
   (command "._break" pick "_f" "_none" c1 "_none" c2)		; break
   (command "._arc" "_none" c1 "_C" "_none" c0 "_none" c2) 	; draw arc (jump)
  ); progn
 ); if

 (command "._undo" "_end")	; clsoe undo group
 (setvar "cmdecho" 1)		; enable command echo
  
 (princ)			; quiet exit
); C:LJ2

&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Jan 2019 18:31:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8521289#M94258</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2019-01-14T18:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8537704#M94259</link>
      <description>&lt;P&gt;Hey, thanks! This solution seems to be working very well. I really appreciate your help!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 14:52:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8537704#M94259</guid>
      <dc:creator>andrew_k</dc:creator>
      <dc:date>2019-01-21T14:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8537743#M94260</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4622096"&gt;@andrew_k&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hey, thanks! This solution seems to be working very well. I really appreciate your help!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Glad to help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 15:05:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8537743#M94260</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2019-01-21T15:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8538170#M94261</link>
      <description>&lt;P&gt;When you get tired of picking points, here is a quick mod to allow for multiple selection &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Enjoy!&lt;/P&gt;
&lt;PRE&gt;(defun c:hops (/ a b d e i p p1 p2 pts s x)
  ;; RJP » 2019-01-21
  ;; Creates hops on a selection of intersecting polylines
  (setq a 0.125)
  (cond
    ((and (setq s (ssget ":L" '((0 . "lwpolyline"))))
	  (&amp;gt; (sslength s) 1)
	  (setq s (mapcar 'vlax-ename-&amp;gt;vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))))
	  (setq b s)
     )
     (foreach e	s
       (if (setq pts (apply 'append
			    (mapcar '(lambda (x) (vlax-invoke e 'intersectwith x acextendnone))
				    (setq b (cdr b))
			    )
		     )
	   )
	 (while	(caddr pts)
	   (cond ((and (setq p (list (car pts) (cadr pts)))
		       (setq i (vlax-curve-getparamatpoint e p))
		       (= 0.0 (vla-getbulge e (fix i)))
		       (setq d (vlax-curve-getdistatpoint e p))
		       (setq p1 (vlax-curve-getpointatdist e (+ d a)))
		       (setq p2 (vlax-curve-getpointatdist e (- d a)))
		  )
		  (vlax-invoke e 'addvertex (setq i (1+ (fix i))) (mapcar '+ p1 '(0 0)))
		  (vlax-invoke e 'addvertex i (mapcar '+ p2 '(0 0)))
		  (vla-setbulge
		    e
		    i
		    (cond ((&amp;lt; (angle '(0 0) p1) (angle '(0 0) p2)) -1.)
			  (1.)
		    )
		  )
		 )
	   )
	   (setq pts (cdddr pts))
	 )
       )
     )
    )
  )
  (princ)
)
(vl-load-com)&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-01-21_10-31-58.gif" style="width: 796px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/593534i5468D38A53143A29/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-01-21_10-31-58.gif" alt="2019-01-21_10-31-58.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 17:40:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8538170#M94261</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2019-01-21T17:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/9776022#M94262</link>
      <description>&lt;P&gt;please send lisp file&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 08:37:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/9776022#M94262</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-30T08:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/9776123#M94263</link>
      <description>&lt;P&gt;WHAT IS COMMAND&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 09:51:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/9776123#M94263</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-30T09:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/9776738#M94264</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;WHAT IS COMMAND&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/8538170#M379844" target="_blank" rel="noopener"&gt;HOPS&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 14:33:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/9776738#M94264</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2020-09-30T14:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10792745#M94265</link>
      <description>&lt;P&gt;This is great but how to make the hop bigger?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 07:25:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10792745#M94265</guid>
      <dc:creator>adhammagdy</dc:creator>
      <dc:date>2021-12-01T07:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10792811#M94266</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8418270"&gt;@adhammagdy&lt;/a&gt;&amp;nbsp; At above function from &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp; change value 0.125 to some greater value.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/crossing-two-lines-with-arc/m-p/10603557/highlight/true#M419967" target="_blank" rel="noopener"&gt;At this link&lt;/A&gt; you can find my solution to similar problem (change radius value if needed (set at 2).&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 08:01:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10792811#M94266</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-12-01T08:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10794467#M94267</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8418270"&gt;@adhammagdy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A few more suggestions &lt;A href="https://www.cadtutor.net/forum/topic/74081-a-lisp-routine-to-break-intersecting-lines-with-a-symbol/?tab=comments#comment-586748" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;HERE&lt;/STRONG&gt;&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 20:03:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10794467#M94267</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2021-12-01T20:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10991661#M94268</link>
      <description>&lt;P&gt;I am back on this project after some time away. I tried messing with your code to make it more suited for me, but have been unable to do so.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to allow lines to be converted as well, and not just polylines. I also wanted control over the arc length and the exact intersection where the arc is being placed (taken from Moshe's code) which is working for me. The program works exactly how I want it to, but only while working exclusively with polylines, which is not always the case on my drawings.&lt;/P&gt;&lt;P&gt;Can you help me get this figured out?&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:LineJump (/ a d e i o p p1 p2 p3)
  ;; Adds a 'hop' to a lwpolyline ( very little error checking )
  ;(setq a 0.125)																; replaced this with arc length user input
  (while (and (setq e (entsel "\nPick a polyline to add a hop: "))
	      ;(= "LWPOLYLINE" (cdr (assoc 0 (entget (car e)))))					; i want to remove check to allow lines as well as polylines
		  ; add step to convert standard lines into polylines to let the program run
	      ;(setq p (vlax-curve-getclosestpointto (car e) (cadr e)))				; replaced by next line
		  (setq p (getpoint "\nSpecify intersection: "))
	      (setq i (1+ (fix (vlax-curve-getparamatpoint (setq e (car e)) p))))
	      (setq d (vlax-curve-getdistatpoint e p))
		  (setq a (getdist "\nSpecify arc length: "))
	      (setq p1 (vlax-curve-getpointatdist e (+ d a)))
	      (setq p2 (vlax-curve-getpointatdist e (- d a)))
	 )
    (setq o (vlax-ename-&amp;gt;vla-object e))
    (vlax-invoke o 'addvertex i (mapcar '+ p1 '(0 0)))
    (vlax-invoke o 'addvertex i (mapcar '+ p2 '(0 0)))
    (vla-setbulge
      o
      i
      (cond ((&amp;lt; (angle '(0 0) p1) (angle '(0 0) p2)) -1.)
	    (1.)
      )
    )
  )
  (princ)
)
(vl-load-com)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 16:54:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10991661#M94268</guid>
      <dc:creator>andrew_k</dc:creator>
      <dc:date>2022-03-08T16:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10991825#M94269</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4622096"&gt;@andrew_k&lt;/a&gt;&amp;nbsp; Maybe convert them ... assuming they are all 2D.&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(defun c:c-l (/ line-&amp;gt;polyline s)
  ;; RJP » 2022-03-08
  (defun line-&amp;gt;polyline	(e / el)
    (if	(and (= (type e) 'ename) (= "LINE" (cdr (assoc 0 (setq el (entget e '("*")))))))
      (progn (entdel e)
	     (entmakex (mapcar '(lambda	(x)
				  (cond	((= (car x) 0) '(0 . "LWPOLYLINE"))
					((= (cdr x) "AcDbLine") '(100 . "AcDbPolyline"))
					((= (car x) 11) (cons 10 (cdr x)))
					(x)
				  )
				)
			       (append (reverse (member '(100 . "AcDbLine") (reverse el)))
				       '((90 . 2) (43 . 0.0) (38 . 0.0) (70 . 0))
				       (cdr (member '(100 . "AcDbLine") el))
			       )
		       )
	     )
      )
    )
  )
  (if (setq s (ssget ":L" '((0 . "LINE"))))
    (foreach line (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (line-&amp;gt;polyline line))
  )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 08 Mar 2022 17:53:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10991825#M94269</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2022-03-08T17:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10991834#M94270</link>
      <description>&lt;P&gt;Thanks for the quick reply! I will test this out in a little while. One question though - is there any chance you could add comments to let me know what each line does? I've been trying to research things, but getting nowhere. This language makes my brain hurt!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 17:57:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10991834#M94270</guid>
      <dc:creator>andrew_k</dc:creator>
      <dc:date>2022-03-08T17:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10992024#M94271</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4622096"&gt;@andrew_k&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am looking to allow lines to be converted as well, and not just polylines. I also wanted control over the arc length and the exact intersection where the arc is being placed ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Something like this?&amp;nbsp; [Untested -- I left much of your code alone]&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:LineJump (/ a d e etype i o p p1 p2)  ;; Adds a 'hop' to a LWPolyline or Line
  (setq a (getdist "\nSpecify arc length: "))
  (setvar 'peditaccept 1); [for PEDIT - could save current value and reset later if desired]
  (while
    (and
      (setq e (entsel "\nPick a line or polyline to add a hop: "))
      (wcmatch (setq etype (cdr (assoc 0 (entget (car e))))) "LINE,LWPOLYLINE")
    ); and
    (if (= etype "LINE") (command "_.pedit" (car e) "")); convert Line to Polyline
    (setq p (getpoint "\nSpecify intersection: "))
    (setq i (1+ (fix (vlax-curve-getparamatpoint (setq e (car e)) p))))
    (setq d (vlax-curve-getdistatpoint e p))
    (setq p1 (vlax-curve-getpointatdist e (+ d a)))
    (setq p2 (vlax-curve-getpointatdist e (- d a)))
    (setq o (vlax-ename-&amp;gt;vla-object e)); make into VLA object for next functions:
    (vlax-invoke o 'addvertex i (mapcar '+ p1 '(0 0)))
    (vlax-invoke o 'addvertex i (mapcar '+ p2 '(0 0)))
    (vla-setbulge ; make into half-circle arc segment
      o
      i
      (cond
        ((&amp;lt; (angle '(0 0) p1) (angle '(0 0) p2)) -1.)
        (1.)
      ); cond
    ); vla-setbulge
  ); while
  (princ)
)
(vl-load-com)
&lt;/LI-CODE&gt;
&lt;P&gt;Enter at the pick-one prompt will end it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A couple of explanations too long for inside the code window:&lt;/P&gt;
&lt;P&gt;The (mapcar '+ {point variable} '(0 0)) parts make a 3-coordinate XYZ point list into a 2-coordinate XY-only list, which it will want for adding a vertex to a LWPolyline.&amp;nbsp; [Read about (mapcar) in Help to understand why.]&lt;/P&gt;
&lt;P&gt;The bulge factor of an arc segment is 1 for a half-circle arc, positive for CCW direction and negative for CW direction.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 19:18:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10992024#M94271</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2022-03-08T19:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10992086#M94272</link>
      <description>&lt;P&gt;This works great for polylines. It has trouble with standard lines though. It converts the line but then exits and spits out an "error: bad argument value: AcDbCurve 57" response. When I run the command on the line it previously converted, it works fine.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 19:40:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10992086#M94272</guid>
      <dc:creator>andrew_k</dc:creator>
      <dc:date>2022-03-08T19:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Simple line break and jump AutoLISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10992091#M94273</link>
      <description>&lt;P&gt;I tested it out and it works, but I am having to select the line twice - once for the hop and once for the convert.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 19:42:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/simple-line-break-and-jump-autolisp/m-p/10992091#M94273</guid>
      <dc:creator>andrew_k</dc:creator>
      <dc:date>2022-03-08T19:42:51Z</dc:date>
    </item>
  </channel>
</rss>

