<?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: Line to Point in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10195401#M62120</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;&lt;SPAN style="font-family: inherit;"&gt;....&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: inherit;"&gt; you could probably use &lt;/SPAN&gt;&lt;STRONG style="color: #333333; font-family: inherit;"&gt;LENGTHEN&lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-family: inherit;"&gt; and the &lt;/SPAN&gt;&lt;STRONG style="color: #333333; font-family: inherit;"&gt;Total&lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-family: inherit;"&gt; option, setting the Total to &lt;/SPAN&gt;&lt;STRONG style="color: #333333; font-family: inherit;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-family: inherit;"&gt;&amp;nbsp;...&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: inherit;"&gt;.&amp;nbsp; [I'm not on an AutoCAD computer to test -- it might reject 0 as a total length.]&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;[It &lt;EM&gt;does&lt;/EM&gt; reject zero as a Total length, so that option is a no-go.]&lt;/P&gt;</description>
    <pubDate>Mon, 29 Mar 2021 10:44:20 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2021-03-29T10:44:20Z</dc:date>
    <item>
      <title>Line to Point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10194382#M62114</link>
      <description>&lt;P&gt;Good day everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know how get line start x &amp;amp; y property and change it to line end x &amp;amp; y property using lsp? By doing so, i should be able to convert a line in to a point. Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joshuamarzamora_3-1616975996262.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/899540i03AE52CB4587D3A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joshuamarzamora_3-1616975996262.png" alt="joshuamarzamora_3-1616975996262.png" /&gt;&lt;/span&gt;&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="joshuamarzamora_2-1616975940975.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/899538iC0EC43758D33C445/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joshuamarzamora_2-1616975940975.png" alt="joshuamarzamora_2-1616975940975.png" /&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, 29 Mar 2021 00:00:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10194382#M62114</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-29T00:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Line to Point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10194550#M62115</link>
      <description>&lt;P&gt;In simplest terms, something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;(defun C:L2P (/ edata)&lt;FONT color="#3366FF"&gt;; = Line {to} Point&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; (setq edata (entget (car (entsel "\nLine to make equivalent to point at end: "))))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; (entmod&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; &amp;nbsp; (subst&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (cons 10 (cdr (assoc 11 edata)))&lt;FONT color="#3366FF"&gt;; pair start entry code 10 with end coordinates&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (assoc 10 edata)&lt;FONT color="#3366FF"&gt;; and replace original start entry with it&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; edata &lt;FONT color="#3366FF"&gt;; in the entity data list&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; &amp;nbsp; )&lt;FONT color="#999999"&gt;; subst&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; )&lt;FONT color="#999999"&gt;; entmod&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; (princ)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;)&lt;FONT color="#999999"&gt;; defun&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#333333"&gt;Reverse the 10 &amp;amp; 11 entries to do the same with the result at the &lt;EM&gt;start&lt;/EM&gt; instead of the end.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#333333"&gt;If you don't know which end is which, you could probably use &lt;STRONG&gt;LENGTHEN&lt;/STRONG&gt; and the &lt;STRONG&gt;Total&lt;/STRONG&gt; option, setting the Total to &lt;STRONG&gt;0&lt;/STRONG&gt; and picking on the Line closer to the &lt;EM&gt;opposite&lt;/EM&gt; end from where you want the resulting equivalent of a point.&amp;nbsp; [I'm not on an AutoCAD computer to test -- it might reject 0 as a total length.]&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 02:05:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10194550#M62115</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-03-29T02:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Line to Point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10194587#M62116</link>
      <description>&lt;P&gt;Thanks, works like magic.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 02:31:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10194587#M62116</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-29T02:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Line to Point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10194681#M62117</link>
      <description>&lt;P&gt;Another simple way of which end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(defun c:test ( / ent pt1 pt2 pt3 d1 d2 temp)
(setq ent (entsel "\nPick line near end req'd "))
(setq pt1 (cadr ent))
(setq pt2 (cdr (assoc 10 (entget (car ent)))))
(setq pt3 (cdr (assoc 11 (entget (car ent)))))
(setq d1 (distance pt1 pt2)
	d2 (distance pt1 pt3)
)
(if (&amp;gt; d1 d2)
    (progn 
    (setq temp pt3)
    (setq pt3 pt2)
    (setq pt2 temp)
    )
)
(command "point" pt2)
(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 04:30:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10194681#M62117</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-03-29T04:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Line to Point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10194723#M62118</link>
      <description>&lt;P&gt;what would be the code if i want it to be done in multiple lines at once? like i would just fence it the all lines inside the fence would be changed to a point?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 05:04:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10194723#M62118</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-29T05:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Line to Point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10195392#M62119</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... multiple lines at once? like i would just fence it the all lines inside the fence would be changed to a point?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Would you care at which end the "point" result lands?&amp;nbsp; It would be pretty easy if you don't [though it could be at your choice of either the start or the end as in my routine].&amp;nbsp; But if you do, would you want it to be at the end &lt;EM&gt;nearer&lt;/EM&gt; to where the selection Fence crosses it, or &lt;EM&gt;farther&lt;/EM&gt; from it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[Also, I'm curious -- is there some reason to make them zero-length Lines, rather than put actual POINT objects at an end of each one?]&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 10:46:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10195392#M62119</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-03-29T10:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Line to Point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10195401#M62120</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;&lt;SPAN style="font-family: inherit;"&gt;....&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: inherit;"&gt; you could probably use &lt;/SPAN&gt;&lt;STRONG style="color: #333333; font-family: inherit;"&gt;LENGTHEN&lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-family: inherit;"&gt; and the &lt;/SPAN&gt;&lt;STRONG style="color: #333333; font-family: inherit;"&gt;Total&lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-family: inherit;"&gt; option, setting the Total to &lt;/SPAN&gt;&lt;STRONG style="color: #333333; font-family: inherit;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-family: inherit;"&gt;&amp;nbsp;...&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: inherit;"&gt;.&amp;nbsp; [I'm not on an AutoCAD computer to test -- it might reject 0 as a total length.]&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;[It &lt;EM&gt;does&lt;/EM&gt; reject zero as a Total length, so that option is a no-go.]&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 10:44:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10195401#M62120</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-03-29T10:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Line to Point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10195553#M62121</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;... multiple lines at once? like i would just fence it the all lines inside the fence would be changed to a point?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do you really mean "all lines &lt;FONT color="#FF0000"&gt;inside&lt;/FONT&gt; the fence"?&amp;nbsp; Fence selection selects only things that are &lt;EM&gt;intersected by&lt;/EM&gt; the fence.&amp;nbsp; If you run a fence around and back to where you started, things &lt;FONT color="#FF0000"&gt;inside&lt;/FONT&gt; that shape will &lt;EM&gt;not&lt;/EM&gt; be selected if the fence does not actually cross them.&amp;nbsp; Do you mean a &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;CP&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;[&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;C&lt;/FONT&gt;&lt;/STRONG&gt;rossing-&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;P&lt;/FONT&gt;&lt;/STRONG&gt;olygon] selection instead?&amp;nbsp; That would select things that it crosses &lt;EM&gt;and also&lt;/EM&gt; things &lt;FONT color="#0000FF"&gt;inside&lt;/FONT&gt; it that it &lt;EM&gt;surrounds&lt;/EM&gt; but does not &lt;EM&gt;cross&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 11:47:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10195553#M62121</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-03-29T11:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Line to Point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10195589#M62122</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;P class="1617019039096"&gt;....&lt;/P&gt;
&lt;P&gt;[Also, I'm curious -- is there some reason to make them zero-length Lines, rather than put actual POINT objects at an end of each one?]&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If an actual POINT object is desired, as in&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;'s suggestion, I would do it this way, which avoids a bunch of calculation:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:L2P (/ aper esel)
  (setq
    aper (getvar 'aperture)
    esel (entsel "\nSelect Line near end for Point replacement: ")
  ); setq
  (setvar 'aperture (getvar 'pickbox))
    ; to ensure not Snapping to some other nearby ENDpoint
  (command "_.point" (osnap (cadr esel) "_end"))
  (setvar 'aperture aper)
  (entdel (car esel))
  (princ)
); defun&lt;/LI-CODE&gt;
&lt;P&gt;[And yes, it should have *error* handling added to ensure the APERTURE System Variable gets reset, or the whole changing of that could be omitted if you would never have a situation with the potential for other ENDpoints within Osnap range of, but closer the the Line's nearest end, to the pick location.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I included &lt;EM&gt;removal of the Line&lt;/EM&gt;, so that the effect is more like the original changing of it to zero length.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 12:01:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10195589#M62122</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-03-29T12:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Line to Point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10239254#M62123</link>
      <description>&lt;P&gt;&lt;SPAN&gt;[Also, I'm curious -- is there some reason to make them zero-length Lines, rather than put actual POINT objects at an end of each one?]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;RE: Originally, I'm just adjusting dimension spaces for ordinated dimension. Then an lisp helped me create multiple ordinated dimensions at once with a defined spacing. The only catch with the lisp is that it only set minimum spacing not maximum. So I just explode the ordinated dimension then remove the text and now I'm here, asking if a line can be changed to point.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 23:24:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10239254#M62123</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-14T23:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Line to Point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10240381#M62124</link>
      <description>&lt;P&gt;If you want the line to remain remove the delete line. (entdel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second answer is I like Kents end solution if you do a ssget "F" it will draw like a pline over the lines you want to add points to so drag the temp line near the desired end. You end up with a selection of lines.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use the apperture method but could not get it to work.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(defun C:L2P2 (/ aper esel x ss ahpllst co-ord ent)
(vl-load-com)
(defun AHpllst ( /)
(command "_pline")
(while (= (getvar "cmdactive") 1 )
  (command (Getpoint))
)
(setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (entlast)))))
(princ)
)

(defun aH:swap ( pt /  )
(setq st (cdr (assoc 10 (entget ent))) end (cdr (assoc 11 (entget ent))))

	(setq d1 (distance st pt))
	(setq d2 (distance end pt))
		(if (&amp;gt; d1 d2)
		(progn 
			(setq temp st)
			(setq st end)
			(setq end temp)
		)
		)
)

(AHpllst)
(setq obj1 (vlax-ename-&amp;gt;vla-object (entlast)))

    ; to ensure not Snapping to some other nearby ENDpoint
  (setvar 'pdmode 34)
(setq ss (ssget "F" co-ord '((0 . "LINE"))))

(repeat (setq x (sslength ss))
    (setq ent (ssname ss (setq x (- x 1))))
    (setq obj2 (vlax-ename-&amp;gt;vla-object ent ))
    (setq intpt   (vlax-invoke obj2 'intersectWith obj1 acExtendNone))
	(aH:swap intpt)
	(command "_.point" st )
)

(vla-delete obj1)

(princ)

); defun&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just drag pline points over the lines near the end of the lines.&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="screenshot377.png" style="width: 909px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/906868i8DBDBA1A9E5468FD/image-size/large?v=v2&amp;amp;px=999" role="button" title="screenshot377.png" alt="screenshot377.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 09:55:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10240381#M62124</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-15T09:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Line to Point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10240618#M62125</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... if you do a ssget "F" it will draw like a pline over the lines you want to add points to so drag the temp line near the desired end. You end up with a selection of lines.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;Just drag pline points over the lines near the end of the lines.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You don't actually need to &lt;EM&gt;draw a Polyline&lt;/EM&gt; to do this.&amp;nbsp; The &lt;STRONG&gt;&lt;FONT color="#000000"&gt;(ssnamex)&lt;/FONT&gt;&lt;/STRONG&gt; function "knows" by what method each object in a selection set was selected, and in the case of pick or Fence selection, &lt;EM&gt;where&lt;/EM&gt; it was selected [the pick point, or the place where the Fence crossed it].&amp;nbsp; So a Point can be placed using ENDpoint Osnap at that location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're willing to be conscious enough to follow the instructions in the prompt [use only individual-pick or Fence selection, including needing to type in the F for the latter], this puts Points at the nearer ends of all objects selected in either of those ways:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:PAE (/ ss); = Points At Ends
  (prompt "\nTo put Points At Ends of objects, BY FENCE OR PICK SELECTION ONLY near desired ends,")
  (if (setq ss (ssget))
    (foreach entry (ssnamex ss); list of objects and how/where selected
      (if (member (car entry) '(1 4)); selected by pick or Fence
        (command
          "_.point" "_end" (cadr (last entry)); selection location
          "_.erase" (cadr entry) "" ; the object
        ); command
      ); if
    ); foreach
  ); if
  (princ)
); defun&lt;/LI-CODE&gt;
&lt;P&gt;It works with Lines, Arcs, Polylines, Splines, Rays, partial Ellipses, Leaders, even Multilines, but could be limited to LINE objects only, or a limited set of objects types, if desired, with a filter for that in the (ssget) function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you disobey the instructions and select things with something like a Window, those will be ignored.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remove or comment out the Erase line if you want to keep the Lines/etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If used on multi-segment Polylines or Leaders, since it uses ENDpoint Osnap, it can sometimes find an internal vertex rather than the overall end.&amp;nbsp; Maybe that can be accounted for if desired.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I find that if I pick the &lt;EM&gt;same object twice&lt;/EM&gt;, near each end, or a Fence crosses it twice like that, or a Fence near one end and a pick near the other, it puts only &lt;EM&gt;one&lt;/EM&gt; Point on it, even without the Erasing.&amp;nbsp; It appears to be always at the end nearer to the &lt;EM&gt;first&lt;/EM&gt; of the selections of it, but I'm not positive of that.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 11:57:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/line-to-point/m-p/10240618#M62125</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-04-15T11:57:21Z</dc:date>
    </item>
  </channel>
</rss>

