<?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: Equal Divide without drawing a line in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8193408#M101134</link>
    <description>&lt;P&gt;Try this out:&lt;/P&gt;&lt;P&gt;I figured you might want a minimum end gap.&lt;/P&gt;&lt;PRE&gt;(defun c:Divvie ( / *error* var vals @2d end1 end2 gap endgap ang d n p pts layer)
  ;; by John Uhden for  pallen9JA6T (08-11-18)
  (vl-load-com)
  (if (not vlax-get-acad-object)(prompt "\n\nNo vlax-get-acad-object.\n"))
  (or *acad* (setq *acad* (vlax-get-acad-object)))
  (or *doc* (setq *doc* (vlax-get *acad* 'ActiveDocument)))
  (setq vars '(cmdecho)
        vals (mapcar 'getvar vars)
        mspace (vlax-get *doc* 'ModelSpace)
        layer &lt;FONT color="#FF0000"&gt;"POINTS"&lt;/FONT&gt; &lt;FONT color="#0000FF"&gt;;; change this to your liking&lt;/FONT&gt;
  )
  (defun *error* (error)
    (mapcar 'setvar vars vals)
    (vla-endundomark *doc*)
    (cond
      ((not error))
      ((wcmatch (strcase error) "*QUIT*,*CANCEL*"))
      (1 (princ (strcat "\nERROR: " error)))
    )
    (princ)
  )
  (vla-endundomark *doc*)
  (vla-startundomark *doc*)
  (mapcar 'setvar vars '(0))
  (command "_.expert" (getvar "expert")) ;; dummy command
  ;;------------------------------------------------------
  ;; Function to convert a 3D point into 2D
  (defun @2d (p)(list (car p)(cadr p)))

  (and
    (setq end1 (getpoint "\n1st end point: "))
    (setq end2 (getpoint end1 "\n2nd end point: "))
    (setq end1 (@2d end1)
               end2 (@2d end2)
    )
    (not (initget 6)) ;; no zeroes or negatives
    (or (setq gap (getdist "\nRegular spacing &amp;lt;12&amp;gt;: "))
      (setq gap 12.0)
    )
    (not (initget 5)) ;; no null or negative
    (setq endgap (getdist "\nMinimum end gap: "))
    (setq ang (angle end1 end2))
    (setq d (distance end1 end2))
    (or
      (&amp;gt; d (* endgap 2))
      (prompt "\nEnd gaps total more than distance between ends.")
    )
    (setq n (fix (/ (- d endgap endgap) gap)))
    (setq endgap (* 0.5 (- d (* n gap))))
    (setq pts (list (setq p (polar end1 ang endgap)) end1))
    (or
      (repeat n
        (setq pts (cons (setq p (polar p ang gap)) pts))
      )
      1
    )
    (setq pts (mapcar '@2d (reverse (cons end2 pts))))
    (vlax-invoke mspace 'addlightweightpolyline (apply 'append pts))
    (foreach p pts
      (entmakex (list '(0 . "POINT")(cons 10 p)(cons 8 layer)))
    )
    (setq ok 9)
  )
  (*error* nil)
)&lt;/PRE&gt;</description>
    <pubDate>Sat, 11 Aug 2018 14:42:04 GMT</pubDate>
    <dc:creator>john.uhden</dc:creator>
    <dc:date>2018-08-11T14:42:04Z</dc:date>
    <item>
      <title>Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8192661#M101129</link>
      <description>&lt;P&gt;I draw parts for wall panels, and I'm trying to find a lisp that will place points equally apart with a maximum distance of 12" apart. I've been drawing a line and using the divide command and then I have to delete the line. I know there has to be better way to do this. I've attached a picture of an example of the finished solution. The points that are circled on the ends are always the same. I need to equally space points between the innermost green points. If the 62-1/4" dimension were to grow by 24", I would need an additional 2 points because of the 12" maximum. Please help, and thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 20:58:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8192661#M101129</guid>
      <dc:creator>pallen9JA6T</dc:creator>
      <dc:date>2018-08-10T20:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8192808#M101130</link>
      <description>&lt;P&gt;That's easy enough.&lt;/P&gt;&lt;P&gt;I just finished something very similar at work.&amp;nbsp; Often we have to cut arcs into chords having a maximum mid-ordinate value.&amp;nbsp; Saves a lot of time compared to trial and error.&lt;/P&gt;&lt;P&gt;Would it be sufficient to just place AutoCAD point objects at the locations?&amp;nbsp; I don't want to get involved in your dimension styles.&amp;nbsp; Bu you could give me a layer name for the points.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 22:42:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8192808#M101130</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-08-10T22:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8192868#M101131</link>
      <description>&lt;P&gt;Try this one, [the command is "divpts"].&lt;/P&gt;&lt;P&gt;What you have to do is to select the green innermost points (one by one), then specify the maximum allowable spacing (here = 12), and the command will do the rest for you.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 23:54:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8192868#M101131</guid>
      <dc:creator>serag.hassouna</dc:creator>
      <dc:date>2018-08-10T23:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8192887#M101132</link>
      <description>&lt;P&gt;How shortsighted of me.&amp;nbsp; If we draw a polyline through each point, you can use QDIM to dimension all the gaps in one shot.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Aug 2018 00:16:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8192887#M101132</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-08-11T00:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8193363#M101133</link>
      <description>&lt;P&gt;Much more of that could be automated, if you like.&amp;nbsp; If&amp;nbsp;your image is of one edge of a rectangle, a routine could ask for just the two opposite corners, or even just the two edge sizes, and could &lt;EM&gt;construct the whole thing&lt;/EM&gt;, not just space the no-more-than-12"-apart Circles [it looks like that's what they are -- grommets? -- not Points], but draw the whole perimeter, the Chamfered corners, the hidden-line parts [hemmed edges?], the other Circles closer to the corners, even the Dimensions, and also the Layers involved.&amp;nbsp; [It would require knowing a few more dimensions that aren't shown in the image, such as the positioning of the "other" Circles, the width of the hemmed edge, etc.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if you really only need the one string of Circles, and since your 12" maximum sounds like a standard [no need to ask for the maximum spacing], it can be simpler:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:&lt;FONT color="#000000"&gt;&lt;STRONG&gt;DIVDC12&lt;/STRONG&gt;&lt;/FONT&gt; (/ cc1 cc2 range spcs spc)
  ; = &lt;FONT color="#000000"&gt;&lt;STRONG&gt;DIV&lt;/STRONG&gt;&lt;/FONT&gt;ide &lt;FONT color="#000000"&gt;&lt;STRONG&gt;D&lt;/STRONG&gt;&lt;/FONT&gt;istance [not object] using &lt;FONT color="#000000"&gt;&lt;STRONG&gt;C&lt;/STRONG&gt;&lt;/FONT&gt;ircles max. &lt;FONT color="#000000"&gt;&lt;STRONG&gt;12&lt;/STRONG&gt;&lt;/FONT&gt;" apart
  (setq
    cc1 (getpoint "\nOne end of range: ")
    cc2 (getpoint "\nOther end: ")
    range (distance cc1 cc2)
    spcs (+ (fix (/ range 12)) (if (equal (rem range 12) 0 1e-4) 0 1))
    spc (/ range spcs)
  ); setq
  (command "_.circle" "_none" cc1 &lt;FONT color="#00ccff"&gt;0.125&lt;/FONT&gt;)&lt;FONT color="#0000ff"&gt;&lt;EM&gt;; assumption -- EDIT radius to your value
&lt;/EM&gt;&lt;/FONT&gt;  (repeat spcs
    (command "_.circle" "_none" (polar (getvar 'lastpoint) (angle cc1 cc2) spc) 0.125)
  ); repeat
  (princ)
); defun&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Aug 2018 14:01:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8193363#M101133</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-11T14:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8193408#M101134</link>
      <description>&lt;P&gt;Try this out:&lt;/P&gt;&lt;P&gt;I figured you might want a minimum end gap.&lt;/P&gt;&lt;PRE&gt;(defun c:Divvie ( / *error* var vals @2d end1 end2 gap endgap ang d n p pts layer)
  ;; by John Uhden for  pallen9JA6T (08-11-18)
  (vl-load-com)
  (if (not vlax-get-acad-object)(prompt "\n\nNo vlax-get-acad-object.\n"))
  (or *acad* (setq *acad* (vlax-get-acad-object)))
  (or *doc* (setq *doc* (vlax-get *acad* 'ActiveDocument)))
  (setq vars '(cmdecho)
        vals (mapcar 'getvar vars)
        mspace (vlax-get *doc* 'ModelSpace)
        layer &lt;FONT color="#FF0000"&gt;"POINTS"&lt;/FONT&gt; &lt;FONT color="#0000FF"&gt;;; change this to your liking&lt;/FONT&gt;
  )
  (defun *error* (error)
    (mapcar 'setvar vars vals)
    (vla-endundomark *doc*)
    (cond
      ((not error))
      ((wcmatch (strcase error) "*QUIT*,*CANCEL*"))
      (1 (princ (strcat "\nERROR: " error)))
    )
    (princ)
  )
  (vla-endundomark *doc*)
  (vla-startundomark *doc*)
  (mapcar 'setvar vars '(0))
  (command "_.expert" (getvar "expert")) ;; dummy command
  ;;------------------------------------------------------
  ;; Function to convert a 3D point into 2D
  (defun @2d (p)(list (car p)(cadr p)))

  (and
    (setq end1 (getpoint "\n1st end point: "))
    (setq end2 (getpoint end1 "\n2nd end point: "))
    (setq end1 (@2d end1)
               end2 (@2d end2)
    )
    (not (initget 6)) ;; no zeroes or negatives
    (or (setq gap (getdist "\nRegular spacing &amp;lt;12&amp;gt;: "))
      (setq gap 12.0)
    )
    (not (initget 5)) ;; no null or negative
    (setq endgap (getdist "\nMinimum end gap: "))
    (setq ang (angle end1 end2))
    (setq d (distance end1 end2))
    (or
      (&amp;gt; d (* endgap 2))
      (prompt "\nEnd gaps total more than distance between ends.")
    )
    (setq n (fix (/ (- d endgap endgap) gap)))
    (setq endgap (* 0.5 (- d (* n gap))))
    (setq pts (list (setq p (polar end1 ang endgap)) end1))
    (or
      (repeat n
        (setq pts (cons (setq p (polar p ang gap)) pts))
      )
      1
    )
    (setq pts (mapcar '@2d (reverse (cons end2 pts))))
    (vlax-invoke mspace 'addlightweightpolyline (apply 'append pts))
    (foreach p pts
      (entmakex (list '(0 . "POINT")(cons 10 p)(cons 8 layer)))
    )
    (setq ok 9)
  )
  (*error* nil)
)&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Aug 2018 14:42:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8193408#M101134</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-08-11T14:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8193415#M101135</link>
      <description>&lt;P&gt;Thank you. That works great. i have another suggestion that would help my work flow a little more. Can you make it where when you repeat the command, it remembers the previously entered "max. dist", but will allow you to change if needed (similar to how the offset and the circle command works)?&lt;/P&gt;</description>
      <pubDate>Sat, 11 Aug 2018 14:49:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8193415#M101135</guid>
      <dc:creator>pallen9JA6T</dc:creator>
      <dc:date>2018-08-11T14:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8193765#M101136</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6380279"&gt;@pallen9JA6T&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;... when you repeat the command, it remembers the previously entered "max. dist", but will allow you to change if needed (similar to how the offset and the circle command works)?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's how I'd do that.&amp;nbsp; I stayed with the Circles in the original image, and you can do the same kind of prompt and default for the radius of those if you want.&amp;nbsp; Or if you really want them to be Points, or Blocks if that's what those Circles are, that's an easy adjustment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:&lt;FONT color="#000000"&gt;&lt;STRONG&gt;DIVDCM&lt;/STRONG&gt;&lt;/FONT&gt; (/ cc1 cc2 range spcs spc)
  &lt;FONT color="#00ccff"&gt;; = &lt;STRONG&gt;DIV&lt;/STRONG&gt;ide &lt;STRONG&gt;D&lt;/STRONG&gt;istance [not object] using &lt;STRONG&gt;C&lt;/STRONG&gt;ircles, at user-specified &lt;STRONG&gt;M&lt;/STRONG&gt;aximum spacing
&lt;/FONT&gt;  (initget (if &lt;FONT color="#ff6600"&gt;*DIVDCmax*&lt;/FONT&gt; 6 7))&lt;FONT color="#00ccff"&gt;; no zero, no negative, no Enter on first use&lt;/FONT&gt;
  (setq
    &lt;FONT color="#ff6600"&gt;*DIVDCmax*&lt;/FONT&gt; &lt;FONT color="#00ccff"&gt;; global variable with routine-specific name
&lt;/FONT&gt;    (cond
      ( (getdist &lt;FONT color="#00ccff"&gt;; returns nil on Enter when permitted
&lt;/FONT&gt;          (strcat
            "\nMaximum Circle spacing"
            (if &lt;FONT color="#ff6600"&gt;*DIVDCmax*&lt;/FONT&gt; (strcat " &amp;lt;" (rtos &lt;FONT color="#ff6600"&gt;*DIVDCmax*&lt;/FONT&gt;) "&amp;gt;") "")
            ": "
          )&lt;FONT color="#999999"&gt;; strcat
&lt;/FONT&gt;        )&lt;FONT color="#999999"&gt;; getdist&lt;/FONT&gt;
      )&lt;FONT color="#999999"&gt;; User-input condition&lt;/FONT&gt;
      (&lt;FONT color="#ff6600"&gt;*DIVDCmax*&lt;/FONT&gt;)&lt;FONT color="#00ccff"&gt;; prior value if present, on Enter&lt;/FONT&gt;
    )&lt;FONT color="#999999"&gt;; cond &amp;amp; *DIVDCmax*
&lt;/FONT&gt;    cc1 (getpoint "\nOne end of range: ")
    cc2 (getpoint "\nOther end: ")
    range (distance cc1 cc2)
    spcs (+ (fix (/ range &lt;FONT color="#ff6600"&gt;*DIVDCmax*&lt;/FONT&gt;)) (if (equal (rem range &lt;FONT color="#ff6600"&gt;*DIVDCmax*&lt;/FONT&gt;) 0 1e-4) 0 1))
    spc (/ range spcs)
  )&lt;FONT color="#999999"&gt;; setq&lt;/FONT&gt;
  (command "_.circle" "_none" cc1 &lt;FONT color="#3366ff"&gt;0.125&lt;/FONT&gt;)&lt;FONT color="#0000ff"&gt;&lt;EM&gt;; assumption -- EDIT radius to your value
&lt;/EM&gt;&lt;/FONT&gt;  (repeat spcs
    (command "_.circle" "_none" (polar (getvar 'lastpoint) (angle cc1 cc2) spc) 0.125)
  )&lt;FONT color="#999999"&gt;; repeat&lt;/FONT&gt;
  (princ)
)&lt;FONT color="#999999"&gt;; defun&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;The use of (get&lt;FONT color="#0000ff"&gt;&lt;STRONG&gt;dist&lt;/STRONG&gt;&lt;/FONT&gt;) [as opposed to (get&lt;FONT color="#99ccff"&gt;real&lt;/FONT&gt;) in&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6332124"&gt;@serag.hassouna&lt;/a&gt;' routine] means that you can also enter the distance by picking two points on-screen, or by typing in a distance involving feet, and/or fractions, none of which&amp;nbsp;options are available with (get&lt;FONT color="#99ccff"&gt;real&lt;/FONT&gt;), which allows only an integer or decimal number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The routine-specific variable name for that maximum distance is so that it's not likely to be replaced by the operation of any other AutoLisp routine.&amp;nbsp; If, for example, it was called simply 'max,' that name might also be used in something else, and if you then came back to this, the default would be wrong.&amp;nbsp; [The * before and after the name is just a convention some people use to distinguish global variable names.&amp;nbsp; Sometimes I use one only before, some people use _ instead, etc. -- completely arbitrary and expendable.]&lt;/P&gt;</description>
      <pubDate>Sun, 12 Aug 2018 01:31:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8193765#M101136</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-12T01:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8193869#M101137</link>
      <description>&lt;P&gt;This works, except for I need points instead of circle. The sample image looks like circle, but that is the way I have my point showing. My CNC machine recognizes the point. Also, is it possible to change from 12" maximum to 16" maximum (if needed)?&lt;/P&gt;</description>
      <pubDate>Sun, 12 Aug 2018 07:07:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8193869#M101137</guid>
      <dc:creator>pallen9JA6T</dc:creator>
      <dc:date>2018-08-12T07:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8193976#M101138</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6380279"&gt;@pallen9JA6T&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;This works, except for I need points instead of circle. .... Also, is it possible to change from 12" maximum to 16" maximum (if needed)?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assume you're referring to my first routine, since in the second, you can specify whatever maximum spacing you want.&amp;nbsp; But here's the Point version of the User-specificable-maximum version, remembering that as default:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;(defun C:DIVDPM (/ cc1 cc2 range spcs spc)
  ; = DIVide Distance [not object] using Points, at user-specified Maximum spacing
  (initget (if *DIVDPmax* 6 7)); no zero, no negative, no Enter on first use
  (setq
    *DIVDPmax* ; global variable with routine-specific name
    (cond
      ( (getdist ; returns nil on Enter when permitted
          (strcat
            "\nMaximum Point spacing"
            (if *DIVDPmax* (strcat " &amp;lt;" (rtos *DIVDPmax*) "&amp;gt;") "")
            ": "
          ); strcat
        ); getdist
      ); User-input condition
      (*DIVDPmax*); prior value if present, on Enter
    ); cond &amp;amp; *DIVDPmax*
    p1 (getpoint "\nOne end of range: ")
    p2 (getpoint "\nOther end: ")
    range (distance p1 p2)
    spcs (+ (fix (/ range *DIVDPmax*)) (if (equal (rem range *DIVDPmax*) 0 1e-4) 0 1))
    spc (/ range spcs)
  ); setq
  (command "_.point" "_none" p1)
  (repeat spcs
    (command "_.point" "_none" (polar (getvar 'lastpoint) (angle p1 p2) spc))
  ); repeat
  (princ)
); defun&lt;/PRE&gt;</description>
      <pubDate>Sun, 12 Aug 2018 12:07:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8193976#M101138</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-12T12:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8194276#M101139</link>
      <description>&lt;P&gt;Yes, I did this before using global variable[s] (the same idea stated by&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;).&lt;BR /&gt;These are 2 versions of the command "&lt;STRONG&gt;&lt;EM&gt;divpts&lt;/EM&gt;&lt;/STRONG&gt;" as requested, the 1st version differs slightly than Mr. Kent's version, by taking 12 as its first default value, &amp;amp; the 2nd version doesn't set any initial default value.&lt;BR /&gt;These 2 versions replaced the [&lt;STRONG&gt;getreal&lt;/STRONG&gt;] function with [&lt;STRONG&gt;getdist&lt;/STRONG&gt;] to accommodate with Mr. Kent's tip.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Aug 2018 20:08:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8194276#M101139</guid>
      <dc:creator>serag.hassouna</dc:creator>
      <dc:date>2018-08-12T20:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8204638#M101140</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;Your solution works great! Is it possible to revise it to omit the point on each of the "range"? Those points already exist, and if they are doubled, it gives me an error on my CNC machine. Thanks so much for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 16:35:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8204638#M101140</guid>
      <dc:creator>pallen9JA6T</dc:creator>
      <dc:date>2018-08-16T16:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8204724#M101141</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6380279"&gt;@pallen9JA6T&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;revise it to omit the point on each of the "range"....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this revision:&lt;/P&gt;
&lt;PRE&gt;(defun C:DIVDPM (/ cc1 cc2 range spcs spc)
  ; = DIVide Distance [not object] using Points, at user-specified Maximum spacing
  (initget (if *DIVDPmax* 6 7)); no zero, no negative, no Enter on first use
  (setq
    *DIVDPmax* ; global variable with routine-specific name
    (cond
      ( (getdist ; returns nil on Enter when permitted
          (strcat
            "\nMaximum Point spacing"
            (if *DIVDPmax* (strcat " &amp;lt;" (rtos *DIVDPmax*) "&amp;gt;") "")
            ": "
          ); strcat
        ); getdist
      ); User-input condition
      (*DIVDPmax*); prior value if present, on Enter
    ); cond &amp;amp; *DIVDPmax*
    p1 (getpoint "\nOne end of range: ")
    p2 (getpoint "\nOther end: ")
    range (distance p1 p2)
    spcs (+ (fix (/ range *DIVDPmax*)) (if (equal (rem range *DIVDPmax*) 0 1e-4) 0 1))
    spc (/ range spcs)
  ); setq
  (&lt;FONT color="#ff0000"&gt;setvar 'lastpoint&lt;/FONT&gt; p1)&lt;EM&gt;&lt;FONT color="#33cccc"&gt;; kind of interesting that that's allowed...&lt;/FONT&gt;&lt;/EM&gt;
  (repeat &lt;FONT color="#ff0000"&gt;(1-&lt;/FONT&gt; spcs&lt;FONT color="#ff0000"&gt;)
&lt;/FONT&gt;    (command "_.point" "_none" (polar (getvar 'lastpoint) (angle p1 p2) spc))
  ); repeat
  (princ)
); defun&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Aug 2018 17:02:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8204724#M101141</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-16T17:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8204738#M101142</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;YOU'RE AWESOME! HAVE A BLESSED DAY!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 17:07:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8204738#M101142</guid>
      <dc:creator>pallen9JA6T</dc:creator>
      <dc:date>2018-08-16T17:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8209886#M101143</link>
      <description>&lt;P&gt;Perhaps you had better take another look at post #6, as I think you need a differing end gap so as to achieve a regular spacing.&amp;nbsp; But you don't want the end gaps too small, either.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Aug 2018 22:46:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8209886#M101143</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-08-19T22:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8209894#M101144</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Actually, &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;'s worked to exactly what I needed. Thanks for reply though.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Aug 2018 23:02:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8209894#M101144</guid>
      <dc:creator>pallen9JA6T</dc:creator>
      <dc:date>2018-08-19T23:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Equal Divide without drawing a line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8209896#M101145</link>
      <description>&lt;P&gt;That's great news!&amp;nbsp; We love that kind.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Aug 2018 23:04:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/equal-divide-without-drawing-a-line/m-p/8209896#M101145</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-08-19T23:04:06Z</dc:date>
    </item>
  </channel>
</rss>

