<?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: Help with numbering points in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9051532#M83776</link>
    <description>&lt;P&gt;i am not comprehending.&amp;nbsp; The polyline IS a path.&amp;nbsp; What can numbering the vertices do for you?&lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2019 00:14:11 GMT</pubDate>
    <dc:creator>john.uhden</dc:creator>
    <dc:date>2019-09-27T00:14:11Z</dc:date>
    <item>
      <title>Help with numbering points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9050405#M83775</link>
      <description>&lt;P&gt;Salutations!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem. I need to create a set of numbered points from&amp;nbsp; polyline vertex (.-.-.-. to 1-2-3-n) and I know how to create the points based on the polyline, but I need to create em with object data attached with the number, in order to form a path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry for the bad english and thanks for any help you can provide&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2019 15:37:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9050405#M83775</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-26T15:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help with numbering points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9051532#M83776</link>
      <description>&lt;P&gt;i am not comprehending.&amp;nbsp; The polyline IS a path.&amp;nbsp; What can numbering the vertices do for you?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 00:14:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9051532#M83776</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2019-09-27T00:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help with numbering points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9051748#M83777</link>
      <description>Yes actually&lt;BR /&gt;the polyline is a path; Its to represent the garbage colllector trucks in&lt;BR /&gt;my hometown. thay provide us with polylines only and I need the nodes&lt;BR /&gt;numbered, because thy use a software that takes those points and make a&lt;BR /&gt;little truck follow the path in a map. from point to point. I tried ussing&lt;BR /&gt;topology but the order the nodes get is from top to bottom and not in the&lt;BR /&gt;sequence of the line.&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Sep 2019 05:02:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9051748#M83777</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-27T05:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help with numbering points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9051759#M83778</link>
      <description>&lt;P&gt;Explain more with sample.......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 05:16:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9051759#M83778</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2019-09-27T05:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with numbering points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9052717#M83779</link>
      <description>&lt;P&gt;Okay.&amp;nbsp; Then presuming the polyline is drawn in the correct direction (numerically ascending), then something like this can work...&lt;/P&gt;
&lt;PRE&gt;(defun c:TruckPath ( / ts th e ent pts i p)
  (and
    (setq ts (* 1 (getvar "textsize")))
    (setq th (cdr (assoc 40 (entget (tblobjname "style" (getvar "textstyle"))))))
    (setq e (car (entsel "\nSelect polyline path: ")))
    (setq ent (entget e))
    (or
      (= (cdr (assoc 0 ent)) "LWPOLYLINE")
      (prompt "\nObject selected is not an LWPOLYLINE.")
    )
    (setq pts (mapcar 'cdr (vl-remove-if-not '(lambda (x)(= (car x) 10)) ent)))
    (setvar "cmdecho" 0)
    (setq i 0)
    (foreach p pts
      (setq p (mapcar '+ p (list ts 0.0 0.0)))
      (if (zerop th)
        (vl-cmdf "_.text" "_non" p "" 0.0 (itoa (setq i (1+ i))))
        (vl-cmdf "_.text" "_non" p 0.0 (itoa (setq i (1+ i))))
      )
    )
  )
  (setvar "cmdecho" 1)
  (princ)
)&lt;/PRE&gt;
&lt;P&gt;Of course it is lacking error and undo controls, but we/you can add those if necessary.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 13:13:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9052717#M83779</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2019-09-27T13:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help with numbering points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9053219#M83780</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;.... thay provide us with polylines only and I need the nodes numbered....&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a way that will number the vertices of either a LightWeight or a "heavy" Polyline [including a 3D one].&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)&lt;BR /&gt;(defun C:&lt;FONT color="#000000"&gt;&lt;STRONG&gt;NPV&lt;/STRONG&gt;&lt;/FONT&gt; (); = &lt;FONT color="#000000"&gt;&lt;STRONG&gt;N&lt;/STRONG&gt;&lt;/FONT&gt;umber &lt;FONT color="#000000"&gt;&lt;STRONG&gt;P&lt;/STRONG&gt;&lt;/FONT&gt;olyline &lt;FONT color="#000000"&gt;&lt;STRONG&gt;V&lt;/STRONG&gt;&lt;/FONT&gt;ertices
  (if
    (and
      (setq esel (entsel "\nSelect Polyline: "))
      (wcmatch (cdr (assoc 0 (entget (setq pl (car esel))))) "*POLYLINE")
    ); and
    (repeat ; then
      (setq n (fix (+ (vlax-curve-getEndParam pl) (if (vlax-curve-isClosed pl) 0 1))))
      (command "_.text" "_mc"
        "_none" (vlax-curve-getPointAtParam pl (setq n (1- n)))
        "" 0 (itoa (1+ n)) &lt;FONT color="#999999"&gt;;;; [omit the "" if current Text Style is of fixed height]&lt;/FONT&gt;
      ); command
    ); repeat
    (prompt "\nNothing selected, or not a Polyline.")
  ); if
  (princ)
); defun&lt;/PRE&gt;
&lt;P&gt;It uses whatever the current Text Style and height are -- a specific one could be built in if desired, and even created if it doesn't already exist in the drawing.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 15:52:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9053219#M83780</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-09-27T15:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help with numbering points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9054162#M83781</link>
      <description>&lt;P&gt;This is it!!!!&lt;BR /&gt;this worked wonders for me&lt;/P&gt;&lt;P&gt;Thank you a lot!!&lt;/P&gt;&lt;P&gt;I was overcomplicating myself with entmake and other stuff&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2019 04:04:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9054162#M83781</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-28T04:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help with numbering points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9054980#M83782</link>
      <description>That's great news!&lt;BR /&gt;I usually prefer entmake but I've had situations where it would blow up&lt;BR /&gt;AutoCAD.&lt;BR /&gt;As &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt; seems to prefer, the command and vl-cmdf functions just&lt;BR /&gt;plain work.  Though many people stumble not recognizing that they have to&lt;BR /&gt;know whether the text style height is zero or not.&lt;BR /&gt;The only major shortcoming in what I provided you was allowing for only&lt;BR /&gt;LWpolylines.  If you need it, I have a preferred way of handling the&lt;BR /&gt;heavies.</description>
      <pubDate>Sat, 28 Sep 2019 22:49:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9054980#M83782</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2019-09-28T22:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help with numbering points</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9055066#M83783</link>
      <description>&lt;P&gt;I found using the Vl 'coordinates the easiest way to get around 2d and 3d plines its just a case of 2 or 3 items make a point in the result from the 'coordinates just check what object is and divide by 2 o r 3 for number of points.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun getcoords (ent)
  (vlax-safearray-&amp;gt;list
    (vlax-variant-value
      (vlax-get-property
    (vlax-ename-&amp;gt;vla-object ent)
    "Coordinates"
      )
    )
 )&lt;BR /&gt;)&lt;BR /&gt;&lt;FONT&gt;(setq co-ords (getcoords (car (entsel "\nplease pick pline"))))&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 29 Sep 2019 01:59:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-with-numbering-points/m-p/9055066#M83783</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-09-29T01:59:56Z</dc:date>
    </item>
  </channel>
</rss>

