<?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: Overkill not working, objects end to end with tiniest possible angle differe in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8437053#M157972</link>
    <description>&lt;P&gt;I should have clarified. When I ran the code on the selections mentioned above, zero lines were joined. The time to finish was simply from iterating through the code.&amp;nbsp;In fact, it may be quicker if there were any lines joined, because any line found to be co-linear is then removed from the list and not compared to the rest. So in a selection of 2400 lines, the first is compared to the other 2399, then the next is compared to 2398, and so forth. I actually came up with a possible solution by&amp;nbsp;sorting out the list into&amp;nbsp;two, one for&amp;nbsp;horizontal lines and the other for vertical,&amp;nbsp;allowing for angles up to 45 degrees, since I reduce all the angles to be less than&amp;nbsp;180 degrees anyway. That way horizontal lines aren't compared to vertical lines when iterated through the list. I'm going to add that.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Nov 2018 18:43:28 GMT</pubDate>
    <dc:creator>jamieq</dc:creator>
    <dc:date>2018-11-30T18:43:28Z</dc:date>
    <item>
      <title>Overkill not working, objects end to end with tiniest possible angle difference</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8434142#M157958</link>
      <description>&lt;P&gt;I was having an issue with overkill not working on lines aligned end to end, so I investigated by using lisp to get the angles of two lines in one typical instance. The angle of one line was 0.0 radians, but the angle of the other was 7.68523e-011 radians, or 0.0000000000768523. I feel like I should be surprised that AutoCAD doesn't treat this as 0 and consider the lines co-linear, but I've used AutoCAD long enough&amp;nbsp;now. So now I'm wondering if there is any way to get these lines to be connected, either by&amp;nbsp;a workaround that allows overkill to work, or another method. Join works, but there are hundreds of instances in my drawing, and I really don't want to spend the time joining them all individually.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 18:28:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8434142#M157958</guid>
      <dc:creator>jamieq</dc:creator>
      <dc:date>2018-11-29T18:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8434411#M157959</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please upload that dwg-file so we can play with these elements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 20:11:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8434411#M157959</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2018-11-29T20:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8434471#M157960</link>
      <description>&lt;P&gt;I put one example in this file. Different numbers, but same result.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 20:29:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8434471#M157960</guid>
      <dc:creator>jamieq</dc:creator>
      <dc:date>2018-11-29T20:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8434940#M157961</link>
      <description>When the overkill dialog appears, check you "Tolerance" Setting (Top Edit Box on my version).</description>
      <pubDate>Fri, 30 Nov 2018 00:15:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8434940#M157961</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2018-11-30T00:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436089#M157962</link>
      <description>&lt;P&gt;Thank you. I've already tried many different values for tolerance. Nothing works. The issue isn't that the lines are apart. They share endpoints, so tolerance isn't a factor. The issue is their angle is off by a minuscule amount.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 13:13:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436089#M157962</guid>
      <dc:creator>jamieq</dc:creator>
      <dc:date>2018-11-30T13:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436142#M157963</link>
      <description>Regardless of it being large or small, they are different: OVERKILL skips over differences not compensated for in the pop-up.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Nov 2018 13:36:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436142#M157963</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2018-11-30T13:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436218#M157964</link>
      <description>&lt;P&gt;It’s insane, because literally the only way to find out that the angle of the non-zero lines is by using the lisp (angle [pt] [pt]) command. Every other way to determine an angle in AutoCAD shows zero.&amp;nbsp;Also there's no command or function in AutoCAD that shows the difference in Y position from one endpoint to the other because it is so small. And since the Overkill box has the option to&amp;nbsp;&amp;nbsp;set the tolerance to 6 decimal points, it is rational to think it would ignore an angle difference at 11 decimal points. That's just some poor programming there.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 14:01:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436218#M157964</guid>
      <dc:creator>jamieq</dc:creator>
      <dc:date>2018-11-30T14:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436364#M157965</link>
      <description>&lt;P&gt;Not really sure what you're after, but since you're saying that the JOIN works, then you probably want to join them.&lt;/P&gt;
&lt;P&gt;This routine I wrote a couple of weeks ago... might be useful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:JoinMultiple (/ ss i a ang lst ent)

  (if (setq ss (ssget "_:L" '((0 . "LINE"))))
    (repeat (setq i (sslength ss))
      (setq ent (ssname ss (setq i (1- i)))
            ang (angle (cdr (assoc 10 (entget ent))) (cdr (assoc 11 (entget ent))))
            ang (rtos (- ang (if (&amp;gt;= ang pi) pi 0.)) 2 6)
            lst (if (setq a (assoc ang lst))
                  (subst (cons ang (cons ent (cdr a)))
                         a
                         lst)
                  (cons (list ang ent) lst)))))
  (foreach l (mapcar 'cdr lst)
    (while (&amp;gt; (length l) 1)
      (setq e (car l)
            l (cdr l))
      (repeat (setq i (length l))
        (command "_.JOIN" e (nth (setq i (1- i)) l) ""))))
  (princ)
 )&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Nov 2018 14:40:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436364#M157965</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2018-11-30T14:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436873#M157966</link>
      <description>&lt;P&gt;The issue is I have is that this scenario exists in hundreds of places in my drawing, some of them co-linear to each other. Using your code, they would all be joined together. I want to join only the co-linear lines within each instance. I've attached another file to show what I mean.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a side note, your code works fine, but I would recommend an undo begin and end.&amp;nbsp;As it is, trying to undo&amp;nbsp;everything it does could mean undoing hundreds of join commands individually depending on how many lines were selected.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 17:38:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436873#M157966</guid>
      <dc:creator>jamieq</dc:creator>
      <dc:date>2018-11-30T17:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436884#M157967</link>
      <description>&lt;P&gt;I decided to attack this myself, having found no other solution. The end result required some number rounding code from &lt;A href="https://www.cadtutor.net/forum/topic/31921-round-up-number-in-autolisp/" target="_blank"&gt;https://www.cadtutor.net/forum/topic/31921-round-up-number-in-autolisp/&lt;/A&gt;. Here's what I came up with. It's a little clunky, but it works, which is the important part.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:JoinCol (/ ang en ent lst p1 p2 p10 p11 ss)

(sssetfirst nil nil)
(command "_undo" "begin")
(if (setq ss (ssget "_:L" '((0 . "LINE"))))
	(progn
		(mapcar '(lambda (x) (if (&amp;gt; (car x) 0) (setq lst (cons (list (cadr x) (setq p1 (cdr (assoc 10 (entget (cadr x))))) (setq p2 (cdr (assoc 11 (entget (cadr x))))) (cond ((&amp;gt;= (setq ang (roundup (angle p1 p2) 0.0001)) (* 2 pi)) (- ang (* 2 pi))) ((&amp;gt;= ang pi) (- ang pi)) (t ang))) lst)))) (ssnamex ss))
		(while lst
			(setq ent (caar lst) lst (cdr lst))
			(while (progn
				(setq en (entget ent) p10 (cdr (assoc 10 en)) p11 (cdr (assoc 11 en)) ang (cond ((&amp;gt;= (setq ang (roundup (angle p10 p11) 0.0001)) (* 2 pi)) (- ang (* 2 pi))) ((&amp;gt;= ang pi) (- ang pi)) (t ang)))
				(if (vl-some '(lambda (x) (if (and (or (equal p10 (cadr x) 0.1)(equal p10 (caddr x) 0.1)(equal p11 (cadr x) 0.1)(equal p11 (caddr x) 0.1))(equal ang (cadddr x) 0.001)) (setq lst (vl-remove x lst) new (car x)))) lst)
					(progn (command "join" ent new "") t)
					nil
				)
			))
		)
	)
)
(command "_undo" "end")
(princ)
)


;;; -------------------------------------------------------------------------------------
;;; Round a number to the closest matching factor
;;; -------------------------------------------------------------------------------------
;;; num : real/integer value to be rounded
;;; fact : real/integer value as factor to be rounded to
;;; Result: real/integer value rounded to the closest matching to fact
;;; -------------------------------------------------------------------------------------
(defun Round (num fact / n1 n2 d1 d2)
 (setq fact (abs fact)
       n1   (RoundDown num fact)
       n2   (+ n1 fact)
       d1   (abs (- num n1))
       d2   (abs (- num n2))
 )
 (if (&amp;lt; d1 d2)
   n1
   n2
 )
)

;;; -------------------------------------------------------------------------------------
;;; Round a number down to the closest matching factor below the value
;;; -------------------------------------------------------------------------------------
;;; num : real/integer value to be rounded
;;; fact : real/integer value as factor to be rounded to
;;; Result: real/integer value rounded to the closest matching to fact
;;; -------------------------------------------------------------------------------------
(defun RoundDown (num fact /)
 (setq num (- num (rem num fact)))
 (if (and (= (type fact) 'INT) (= (type num) 'REAL))
   (fix num)
   num
 )
)

;;; -------------------------------------------------------------------------------------
;;; Round a number up to the closest matching factor above the value
;;; -------------------------------------------------------------------------------------
;;; num : real/integer value to be rounded
;;; fact : real/integer value as factor to be rounded to
;;; Result: real/integer value rounded to the closest matching to fact
;;; -------------------------------------------------------------------------------------
(defun RoundUp (num fact /)
 (+ (RoundDown num fact) (abs fact))
)&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Nov 2018 17:42:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436884#M157967</guid>
      <dc:creator>jamieq</dc:creator>
      <dc:date>2018-11-30T17:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436970#M157968</link>
      <description>&lt;P&gt;Now, if anyone has any tips on faster iteration, I'd love to know. I ran this code on a set of 2400 lines, and it rook about 5 seconds to&amp;nbsp;finish. On a set of 4800 lines it took about 18 seconds to finish. On a set of 7000 lines it took about 41 seconds to finish. On a set of 11400 lines I escaped out of the program at two minutes.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 18:07:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436970#M157968</guid>
      <dc:creator>jamieq</dc:creator>
      <dc:date>2018-11-30T18:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436981#M157969</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/99777"&gt;@jamieq&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Now, if anyone has any tips on faster&amp;nbsp;...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;blockquote&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;li-user login="jamieq" uid="99777"&amp;gt;&amp;lt;/li-user&amp;gt;&amp;amp;nbsp;wrote:&amp;lt;br&amp;gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;
&amp;lt;pre&amp;gt;(defun c:JoinCol (/ ang en ent lst p1 p2 p10 p11 ss)
...
					(progn &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;(command "join" ent new "")&lt;/FONT&gt;&lt;/STRONG&gt; t)
					nil
...&amp;lt;/pre&amp;gt;
&amp;lt;hr&amp;gt;&amp;lt;/blockquote&amp;gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;... and of course,&amp;nbsp;you can divide that ss into squares and then work with smaller sss.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 18:14:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436981#M157969</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2018-11-30T18:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436986#M157970</link>
      <description>&lt;P&gt;I don't follow. Can you elaborate?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 18:14:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436986#M157970</guid>
      <dc:creator>jamieq</dc:creator>
      <dc:date>2018-11-30T18:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436996#M157971</link>
      <description>&lt;P&gt;Definitely the slowest part of your code. Replace that with the&amp;nbsp;entmod...&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 18:17:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8436996#M157971</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2018-11-30T18:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8437053#M157972</link>
      <description>&lt;P&gt;I should have clarified. When I ran the code on the selections mentioned above, zero lines were joined. The time to finish was simply from iterating through the code.&amp;nbsp;In fact, it may be quicker if there were any lines joined, because any line found to be co-linear is then removed from the list and not compared to the rest. So in a selection of 2400 lines, the first is compared to the other 2399, then the next is compared to 2398, and so forth. I actually came up with a possible solution by&amp;nbsp;sorting out the list into&amp;nbsp;two, one for&amp;nbsp;horizontal lines and the other for vertical,&amp;nbsp;allowing for angles up to 45 degrees, since I reduce all the angles to be less than&amp;nbsp;180 degrees anyway. That way horizontal lines aren't compared to vertical lines when iterated through the list. I'm going to add that.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 18:43:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8437053#M157972</guid>
      <dc:creator>jamieq</dc:creator>
      <dc:date>2018-11-30T18:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Overkill not working, objects end to end with tiniest possible angle differe</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8437380#M157973</link>
      <description>&lt;P&gt;Added some sorting to the code to speed up the iteration. Now a selection of 4800 finishes in about 9 seconds, and a selection of 7000 in about 20 seconds. Half the time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:JoinCol (/ a ang b en ent hor lst p1 p2 p10 p11 ss ver)

(sssetfirst nil nil)
(command "_undo" "begin")
(if (setq ss (ssget "_:L" '((0 . "LINE"))))
	(progn
		(repeat (setq i (sslength ss))
			(setq tmp (list (setq e (ssname ss (setq i (1- i)))) (setq p1 (cdr (assoc 10 (entget e)))) (setq p2 (cdr (assoc 11 (entget e)))) (cond ((&amp;gt;= (setq ang (roundup (angle p1 p2) 0.0001)) (* 2 pi)) (- ang (* 2 pi))) ((&amp;gt;= ang pi) (- ang pi)) (t ang))))
			(if (&amp;lt; (* 0.2 pi) (cadddr tmp) (* 0.8 pi)) (setq ver (cons tmp ver)) (setq hor (cons tmp hor)))
		)
		(setq a 0)
		(foreach x (list hor ver)
			(setq lst x)
			(while lst
				(setq ent (caar lst) lst (cdr lst) b 0)
				(while (progn
					(setq en (entget ent) p10 (cdr (assoc 10 en)) p11 (cdr (assoc 11 en)) ang (cond ((&amp;gt;= (setq ang (roundup (angle p10 p11) 0.0001)) (* 2 pi)) (- ang (* 2 pi))) ((&amp;gt;= ang pi) (- ang pi)) (t ang)))
					(if (vl-some '(lambda (x) (if (and (or (equal p10 (cadr x) fuzz)(equal p10 (caddr x) fuzz)(equal p11 (cadr x) fuzz)(equal p11 (caddr x) fuzz))(equal ang (cadddr x) 0.001)) (setq lst (vl-remove x lst) new (car x)))) lst)
						(progn (command "join" ent new "") (setq b (1+ b)))
						nil
					)
				))
				(if (&amp;gt; b 0) (setq a (+ (1+ b) a)))
			)
		)
	)
)
(princ (strcat "\n" (itoa a) " lines joined."))
(command "_undo" "end")
(princ)
)&lt;BR /&gt;&lt;BR /&gt;;;; -------------------------------------------------------------------------------------&lt;BR /&gt;;;; Round a number to the closest matching factor&lt;BR /&gt;;;; -------------------------------------------------------------------------------------&lt;BR /&gt;;;; num : real/integer value to be rounded&lt;BR /&gt;;;; fact : real/integer value as factor to be rounded to&lt;BR /&gt;;;; Result: real/integer value rounded to the closest matching to fact&lt;BR /&gt;;;; -------------------------------------------------------------------------------------&lt;BR /&gt;(defun Round (num fact / n1 n2 d1 d2)&lt;BR /&gt; (setq fact (abs fact)&lt;BR /&gt; n1 (RoundDown num fact)&lt;BR /&gt; n2 (+ n1 fact)&lt;BR /&gt; d1 (abs (- num n1))&lt;BR /&gt; d2 (abs (- num n2))&lt;BR /&gt; )&lt;BR /&gt; (if (&amp;lt; d1 d2)&lt;BR /&gt; n1&lt;BR /&gt; n2&lt;BR /&gt; )&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;;;; -------------------------------------------------------------------------------------&lt;BR /&gt;;;; Round a number down to the closest matching factor below the value&lt;BR /&gt;;;; -------------------------------------------------------------------------------------&lt;BR /&gt;;;; num : real/integer value to be rounded&lt;BR /&gt;;;; fact : real/integer value as factor to be rounded to&lt;BR /&gt;;;; Result: real/integer value rounded to the closest matching to fact&lt;BR /&gt;;;; -------------------------------------------------------------------------------------&lt;BR /&gt;(defun RoundDown (num fact /)&lt;BR /&gt; (setq num (- num (rem num fact)))&lt;BR /&gt; (if (and (= (type fact) 'INT) (= (type num) 'REAL))&lt;BR /&gt; (fix num)&lt;BR /&gt; num&lt;BR /&gt; )&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;;;; -------------------------------------------------------------------------------------&lt;BR /&gt;;;; Round a number up to the closest matching factor above the value&lt;BR /&gt;;;; -------------------------------------------------------------------------------------&lt;BR /&gt;;;; num : real/integer value to be rounded&lt;BR /&gt;;;; fact : real/integer value as factor to be rounded to&lt;BR /&gt;;;; Result: real/integer value rounded to the closest matching to fact&lt;BR /&gt;;;; -------------------------------------------------------------------------------------&lt;BR /&gt;(defun RoundUp (num fact /)&lt;BR /&gt; (+ (RoundDown num fact) (abs fact))&lt;BR /&gt;)&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Nov 2018 20:20:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/overkill-not-working-objects-end-to-end-with-tiniest-possible/m-p/8437380#M157973</guid>
      <dc:creator>jamieq</dc:creator>
      <dc:date>2018-11-30T20:20:29Z</dc:date>
    </item>
  </channel>
</rss>

