<?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 Comman to create Points in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/8498059#M132650</link>
    <description>&lt;P&gt;Thank you&lt;img id="womanhappy" class="emoticon emoticon-womanhappy" src="https://forums.autodesk.com/i/smilies/16x16_woman-happy.png" alt="Woman Happy" title="Woman Happy" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jan 2019 13:31:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-01-03T13:31:47Z</dc:date>
    <item>
      <title>Lisp Comman to create Points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/6287118#M132645</link>
      <description>&lt;P&gt;Is there a comman to create points on the corners of a polyline?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance, at each corner of a recatangular pond?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If not, is there a command to place a point in the center of specific shapes?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have googled all this, and can't find what I am looking for.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 15:52:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/6287118#M132645</guid>
      <dc:creator>CES-3B</dc:creator>
      <dc:date>2016-04-22T15:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Comman to create Points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/6287237#M132646</link>
      <description>&lt;P&gt;Please upload a sample dwg , with a before and after.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 16:35:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/6287237#M132646</guid>
      <dc:creator>devitg</dc:creator>
      <dc:date>2016-04-22T16:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Comman to create Points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/6287402#M132647</link>
      <description>&lt;P&gt;Try this Lee's complex pt manager...&lt;/P&gt;
&lt;P&gt;&lt;A href="http://lee-mac.com/ptmanager.html" target="_blank"&gt;http://lee-mac.com/ptmanager.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or simple routine&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;(vl-load-com)

(defun c:foo ( / obj c i x y e)
  (setq *model-space* (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))))
  (setq obj (vlax-ename-&amp;gt;vla-object (car (entsel))))
  (setq c (vlax-get obj "Coordinates")
        i 0
        e (vla-get-elevation obj)
  )
  (repeat (/ (length c) 2)
    (setq x (nth i c)
          y (nth (1+ i) c)
    )
    (vla-addpoint *model-space* (vlax-3d-point (list x y e)))
    (setq i (+ i 2))
  )
  (princ)
)&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;made by alanjt, modified. Original available&amp;nbsp;&lt;A href="http://www.cadtutor.net/forum/showthread.php?46891-Insert-a-point-at-each-vertex-of-selected-polys" target="_self"&gt;here&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 17:42:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/6287402#M132647</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2016-04-22T17:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Comman to create Points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/6287548#M132648</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2406005"&gt;@CES-3B&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Is there a comman to create points on the corners of a polyline?&lt;/P&gt;
&lt;P&gt;For instance, at each corner of a recatangular pond?&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;BeekeeCZ's/alanjt's routine apparently does only one LW[only]Polyline at a time.&amp;nbsp; Here's a [lightly tested but apparently viable]&amp;nbsp;way to do that for &lt;EM&gt;as many as you want to select&lt;/EM&gt;, all at once, and &lt;EM&gt;they can be LW, "heavy" 2D or 3D Polylines&lt;/EM&gt;, or any combination of varieties.&amp;nbsp; It works in different UCS's.&amp;nbsp; It puts the Points on the current Layer, but could be made to match the Layer of the Polyline, and&amp;nbsp;there are&amp;nbsp;other possible enhancements, such as to set a PDMODE value for Point visibility.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:PPV (/ ppvss n pl m); = Points at all Polyline Vertices
  (prompt "\nTo place Points at the vertices of all selected Polylines,")
  (if (setq ppvss (ssget '((0 . "*POLYLINE"))))
    (repeat (setq n (sslength ppvss)); then
      (setq pl (ssname ppvss (setq n (1- n))))
      (repeat
        (setq m (+ (fix (vlax-curve-getEndParam pl)) (if (vlax-curve-isClosed pl) 0 1)))
        (command "_.point" "_none" (trans (vlax-curve-getPointAtParam pl (setq m (1- m))) 0 1))
      ); repeat [within each Polyline]
    ); repeat [through selection]
    (prompt "\nNo Polyline(s) selected.")
  ); if
  (princ)
); defun
(vl-load-com)&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Apr 2016 18:36:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/6287548#M132648</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-04-22T18:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Comman to create Points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/6287601#M132649</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2406005"&gt;@CES-3B&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;is there a command to place a point in the center of specific shapes?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A Search will reveal a variety of threads about finding the centers of things.&amp;nbsp;But you would need to decide &lt;EM&gt;what "center" means&lt;/EM&gt; in some cases.&amp;nbsp; There's the center of the bounding box, the "center of gravity" [which you can get by calculation for certain kinds of shapes, or from making a Region out of it for &lt;EM&gt;any&lt;/EM&gt; shape and getting its Centroid property], and other possible definitions.&amp;nbsp; For triangles specifically, there are a &lt;A href="https://en.wikipedia.org/wiki/Triangle_center" target="_self"&gt;batch of ways to define the center&lt;/A&gt;, &lt;EM&gt;five&lt;/EM&gt; of which you can identify with&amp;nbsp;my TriangleCenters.lsp&amp;nbsp;routine, available &lt;A href="http://cadtips.cadalyst.com/lisp-code-modules/find-centers-triangular-objects" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp; For some regular-enough shapes, several and sometimes all definitions would come up with&amp;nbsp;the same center location, but certainly not for a lot of shapes.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 18:58:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/6287601#M132649</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-04-22T18:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Comman to create Points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/8498059#M132650</link>
      <description>&lt;P&gt;Thank you&lt;img id="womanhappy" class="emoticon emoticon-womanhappy" src="https://forums.autodesk.com/i/smilies/16x16_woman-happy.png" alt="Woman Happy" title="Woman Happy" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 13:31:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-comman-to-create-points/m-p/8498059#M132650</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-03T13:31:47Z</dc:date>
    </item>
  </channel>
</rss>

