<?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: lisp for combine trim and extend command in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/13234522#M124603</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14857755"&gt;@_anonandon&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;... I'd like to select a handful of lwpolylines, one of them closed, and have all the open polyline extend/trim to the closed one. ...&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Possibly like this...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Dec 2024 09:21:57 GMT</pubDate>
    <dc:creator>ВeekeeCZ</dc:creator>
    <dc:date>2024-12-30T09:21:57Z</dc:date>
    <item>
      <title>lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/6819490#M124590</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I apologize if there is similar post in this forum but i cant found it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Often I have a problem like&amp;nbsp;on the attached picture. &amp;nbsp;To get drawing B from drawing A i must use trim and extend functions on lines with two parts (magenta yelow lines) or on single lines (blue ones). One part of line i must trim on white line and other part&amp;nbsp;i must extend to white line. Single lines i must only extend or trim. If I only have one line, or one line with two parts&amp;nbsp;that is not such a problem. However, if there are more of them it can be quite boring.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is there a&amp;nbsp;chance someone to make me lisp like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. to choose white line first.&lt;/P&gt;
&lt;P&gt;2. to choose all other colored lines&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After that&amp;nbsp;the lisp command will make drawing B from drawing A.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is just a sample. The color of lines is not valid in making lisp command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Beside the picture bellow i got file of sample attached too&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you this will help me a lot and save my time.&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="slika.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/313466i73C8B39A1BD65BDE/image-size/large?v=v2&amp;amp;px=999" role="button" title="slika.png" alt="slika.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 14:19:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/6819490#M124590</guid>
      <dc:creator>miroslav.pristov</dc:creator>
      <dc:date>2017-01-20T14:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/6819514#M124591</link>
      <description>&lt;P&gt;I am not quite getting what you are asking but I had an issue with trim till I found I could hold down shift while in the command&amp;nbsp;and it turns it into the extend command. Maybe that helps?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 14:26:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/6819514#M124591</guid>
      <dc:creator>Satoews</dc:creator>
      <dc:date>2017-01-20T14:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/6819525#M124592</link>
      <description>&lt;P&gt;Hi, try this. I just found it in my archive... looks good so far.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: finally I've found my own version...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 14:36:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/6819525#M124592</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2017-01-20T14:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/6820280#M124593</link>
      <description>&lt;P&gt;I see you already have some good solutions from very good people.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an alternative, does this sound like what you want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;;; Multiple EXtend TRIM program allows user to select a group of ARCS, LINES,&lt;BR /&gt; ;; or 2D POLYLINES as boundaries and select a group of LINES to extend or trim.&lt;BR /&gt; ;; Intersection points are computed and the NEAREST endpoint is modified to the&lt;BR /&gt; ;; point of intersection. There is no need to know whether each line should be&lt;BR /&gt; ;; extended or trimmed, therefor eliminating time consuming zooms.&lt;/P&gt;
&lt;P&gt;;; The program is written to reset all drawing variables to their initial&lt;BR /&gt; ;; states. An "UNDO" command will remove all entities created, and restore&lt;BR /&gt; ;; any deleted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's already written. &amp;nbsp;Would just have to remove security to make it freeware.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 18:13:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/6820280#M124593</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-01-20T18:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/11523628#M124594</link>
      <description>&lt;P&gt;I could use this lisp. Is it possible for you to send it to me?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 18:50:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/11523628#M124594</guid>
      <dc:creator>mattcourage</dc:creator>
      <dc:date>2022-11-01T18:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/11523784#M124595</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2911731"&gt;@mattcourage&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would be glad to post it, if I could find it.&lt;/P&gt;
&lt;P&gt;It's not here at work with me so I hope it's at home.&amp;nbsp; Will search.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 20:11:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/11523784#M124595</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2022-11-01T20:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/11524164#M124596</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2911731"&gt;@mattcourage&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found MEXTRIM.lsp at home.&amp;nbsp; Just have to redact it.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 23:31:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/11524164#M124596</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2022-11-01T23:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/11526224#M124597</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2911731"&gt;@mattcourage&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here ya go.&lt;/P&gt;
&lt;P&gt;It's old, and it doesn't seem to be working the way I had thought.&lt;/P&gt;
&lt;P&gt;If you have a collection of somewhat parallel lines (to be modified) and then say one arc, one polyline, and one line&amp;nbsp; (boundaries) near each end of the lines, you can't be sure which of the boundary objects will be the limit of trimming or extending.&amp;nbsp; But if you have just one boundary object at one or each end, then I think it works as expected.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 17:26:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/11526224#M124597</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2022-11-02T17:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/11527059#M124598</link>
      <description>Thanks a lot. I’ll give it a try.&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Nov 2022 00:50:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/11527059#M124598</guid>
      <dc:creator>mattcourage</dc:creator>
      <dc:date>2022-11-03T00:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/11528247#M124599</link>
      <description>&lt;P&gt;If those magenta and yellow pieces &lt;EM&gt;share endpoints without overlapping&lt;/EM&gt;, you can also do it by grip-editing.&amp;nbsp; Just have INTersection running Object Snap turned on, grab all the magenta and yellow pieces [or even everything in the area including the white line], pick on a grip where two endpoints meet, and drag it to the INTersection of the white line with whichever of them INTersects it.&amp;nbsp; That would be faster than using a Trim or Extend command and Shift to toggle, because the latter means doing something with each piece in a pair separately, but by grip-editing you can move the endpoints of both together.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 13:45:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/11528247#M124599</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2022-11-03T13:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/13228327#M124600</link>
      <description>&lt;P&gt;thanks for the ExtendTrim Mr BeeKee! works for my use but could someone change the way it selects objects please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to select a handful of lwpolylines, one of them closed, and have all the open polyline extend/trim to the closed one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This selection works on its own but I cant get it to work in BeeKee's ExtendTrim&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;;ORIGINAL by Dexus
; throw an error of more than one closed poly selected??

(if (setq ss1 (ssget '((0 . "*LINE")))) (progn
	(setq sx (ssadd) ; Create empty selectionset
	      ss (ssadd) ; Create empty selectionset
	      counter 0)
	(repeat (setq i (sslength ss1)) ; Loop through selectionset and split into two sets
		(setq e (ssname ss1 (setq i (1- i))))
		(if (eq (cdr (assoc 70 (entget e))) 129) ; Decide which set to add to.
			(ssadd e sx)
			(ssadd e ss)
		)
	)
	(setq ss1 nil) ; Remove origional set&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2024 10:12:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/13228327#M124600</guid>
      <dc:creator>_anonandon</dc:creator>
      <dc:date>2024-12-24T10:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/13228488#M124601</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14857755"&gt;@_anonandon&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;I'd like to select a handful of lwpolylines, one of them closed....&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;....
		(if (eq (cdr (assoc 70 (entget e))) 129) ; Decide which set to add to.
....&lt;/LI-CODE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Careful -- that test will recognize only closed LWPolylines &lt;STRONG&gt;&lt;EM&gt;with linetype generation enabled&lt;/EM&gt;&lt;/STRONG&gt;.&amp;nbsp; The indicator for being &lt;STRONG&gt;&lt;EM&gt;closed&lt;/EM&gt;&lt;/STRONG&gt; is the &lt;STRONG&gt;1&lt;/STRONG&gt; bit, and for a closed one &lt;STRONG&gt;&lt;EM&gt;without&lt;/EM&gt;&lt;/STRONG&gt; linetype generation enabled, that&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt; (assoc 70)&lt;/STRONG&gt; &lt;/FONT&gt;value will be just&amp;nbsp;&lt;STRONG&gt;1&lt;/STRONG&gt;, &lt;EM&gt;not&lt;/EM&gt; &lt;STRONG&gt;129&lt;/STRONG&gt;.&amp;nbsp; The additional 128 is the bit indicating that linetype generation is on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This test will recognize that a Polyline is closed, &lt;STRONG&gt;&lt;EM&gt;whether or not&lt;/EM&gt;&lt;/STRONG&gt; linetype generation is enabled:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;(if (= &lt;FONT color="#FF0000"&gt;(logand&lt;/FONT&gt; (cdr (assoc 70 (entget e)))&lt;FONT color="#FF0000"&gt; 1)&lt;/FONT&gt; 1)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2024 12:45:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/13228488#M124601</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-12-24T12:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/13228517#M124602</link>
      <description>&lt;P&gt;thanks, a much better test!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2024 13:20:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/13228517#M124602</guid>
      <dc:creator>_anonandon</dc:creator>
      <dc:date>2024-12-24T13:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/13234522#M124603</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14857755"&gt;@_anonandon&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;... I'd like to select a handful of lwpolylines, one of them closed, and have all the open polyline extend/trim to the closed one. ...&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Possibly like this...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 09:21:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/13234522#M124603</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2024-12-30T09:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: lisp for combine trim and extend command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/13257750#M124604</link>
      <description>&lt;P&gt;legend!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 14:15:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-combine-trim-and-extend-command/m-p/13257750#M124604</guid>
      <dc:creator>_anonandon</dc:creator>
      <dc:date>2025-01-13T14:15:13Z</dc:date>
    </item>
  </channel>
</rss>

