<?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: LW Polyline Vertex in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9724283#M70763</link>
    <description>&lt;P&gt;Nice idea for anyone using Bricscad does not support get or set property. Kent Cooper works.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Sep 2020 00:20:28 GMT</pubDate>
    <dc:creator>Sea-Haven</dc:creator>
    <dc:date>2020-09-02T00:20:28Z</dc:date>
    <item>
      <title>LW Polyline Vertex</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9722925#M70756</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have hundreds of polylines in my file . Every polyline has 3 vertex (x,y). I would like to modify vertex no 3 to have same y coordinates as vertex no 2. Is any simple way to do it ?&lt;/P&gt;&lt;P&gt;Thanks for help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 12:00:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9722925#M70756</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-01T12:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: LW Polyline Vertex</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9722980#M70757</link>
      <description>&lt;P&gt;Reasonably simple.&amp;nbsp; Pull the Coordinates VLA property, put its 4th entry in again in place of the last one, and apply that new Coordinates list to the Polyline.&amp;nbsp; Try this [minimally tested]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:3rdY (/ ss n obj co)
  (if (setq ss (ssget '((0 . "LWPOLYLINE"))))
    (repeat (setq n (sslength ss)); then
      (setq
        obj (vlax-ename-&amp;gt;vla-object (ssname ss (setq n (1- n))))
        co (vlax-get obj 'Coordinates)
      ); setq
      (vlax-put obj 'Coordinates (reverse (cons (nth 3 co) (cdr (reverse co)))))
    ); repeat
  ); if
  (princ)
); defun
(vl-load-com)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 12:28:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9722980#M70757</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-09-01T12:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: LW Polyline Vertex</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9723031#M70758</link>
      <description>&lt;P&gt;Great It works perfect &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 12:47:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9723031#M70758</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-01T12:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: LW Polyline Vertex</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9723047#M70759</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Great It works perfect &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Good.&amp;nbsp; Of course you understand that it's very specific to &lt;EM&gt;3&lt;/EM&gt;-vertex Polylines, and if any other kind gets selected, the result will probably not be what you intend.&amp;nbsp; It could be made to &lt;EM&gt;limit selection&lt;/EM&gt;&amp;nbsp; to only those with 3 vertices, to avoid unexpected effects on Polylines you didn't want to change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you might sometimes need to do the same on longer ones, it could be adjusted so that [for example] it changes the Y coordinate of the &lt;EM&gt;last&lt;/EM&gt;&amp;nbsp; vertex to be the same as that of the &lt;EM&gt;next-to-last&lt;/EM&gt;&amp;nbsp; one, no matter how many there are.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 12:57:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9723047#M70759</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-09-01T12:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: LW Polyline Vertex</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9723071#M70760</link>
      <description>&lt;P&gt;Yes I know this is for this particular case. These polyline&amp;nbsp; are always the same in my files.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the perfect solution to my problem. Fast and effective &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 13:08:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9723071#M70760</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-01T13:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: LW Polyline Vertex</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9723175#M70761</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;/&amp;nbsp;@Anonymous&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can also easily be accomplished without VisualLisp by using the &lt;A href="https://help.autodesk.com/view/OARX/2020/ENU/?guid=GUID-8E5913FC-09ED-4C70-AFB7-2431C062E899" target="_blank" rel="noopener"&gt;get...&lt;/A&gt;/&lt;A href="https://help.autodesk.com/view/OARX/2020/ENU/?guid=GUID-8F32FD8C-D81A-4DCA-B455-9D560CF17246" target="_blank" rel="noopener"&gt;setpropertyvalue&lt;/A&gt; functions. People often forget that these functions have the ability to access collections inside the entity. Kent's answer works fine, this is just an alternative approach.&lt;/P&gt;&lt;PRE&gt;(defun c:TEST ( / ss e cnt)
  (if (setq ss (ssget '((0 . "LWPOLYLINE"))))
    (repeat (setq cnt (sslength ss))
      (setq e (ssname ss (setq cnt (1- cnt))))
      (setpropertyvalue e "Vertices" 2 "Position/Y" (getpropertyvalue e "Vertices" 1 "Position/Y"))
    );repeat
  );if
  (prompt "\nComplete.")
  (princ)
);defun&lt;/PRE&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;DD&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 13:53:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9723175#M70761</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2020-09-01T13:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: LW Polyline Vertex</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9723201#M70762</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5680873"&gt;@CodeDing&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
...
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:TEST ( / ss e cnt)
  (if (setq ss (ssget '((0 . "LWPOLYLINE") &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;(90 . 3)&lt;/STRONG&gt;&lt;/FONT&gt;)))
    (repeat (setq cnt (sslength ss))
      (setq e (ssname ss (setq cnt (1- cnt))))
      (setpropertyvalue e "Vertices" 2 "Position/Y" (getpropertyvalue e "Vertices" 1 "Position/Y"))
    );repeat
  );if
  (prompt "\nComplete.")
  (princ)
);defun&lt;/PRE&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;DD&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;... as a minimum for error prevention. But +1 for the simplicity.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 14:05:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9723201#M70762</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2020-09-01T14:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: LW Polyline Vertex</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9724283#M70763</link>
      <description>&lt;P&gt;Nice idea for anyone using Bricscad does not support get or set property. Kent Cooper works.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 00:20:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lw-polyline-vertex/m-p/9724283#M70763</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-09-02T00:20:28Z</dc:date>
    </item>
  </channel>
</rss>

