<?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 Create a path array with 2 points of the object on the curve in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13145429#M7804</link>
    <description>&lt;P&gt;I work in the event industry so I have a lot of fencing to draw and I'm trying to make it as efficient as possible. I currently use a path array to generate my fencing quickly. It works great when its straight lines but as soon as there is a curve, I can't get my blocks to stay linked. (cfr. image&lt;SPAN&gt;&amp;nbsp;)&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="Capture d'écran 2024-11-05 141809.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1432791iF0FB1BC388AF9C63/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture d'écran 2024-11-05 141809.png" alt="Capture d'écran 2024-11-05 141809.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any solution to force 2 points of the block to stay on the path ? The closest solution I could get is to set the base point on the middle of the block so I can get the tangent but it's not perfect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope I'm being clear, English is not my first language.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2024 09:48:34 GMT</pubDate>
    <dc:creator>ColinRuy</dc:creator>
    <dc:date>2024-11-12T09:48:34Z</dc:date>
    <item>
      <title>Create a path array with 2 points of the object on the curve</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13145429#M7804</link>
      <description>&lt;P&gt;I work in the event industry so I have a lot of fencing to draw and I'm trying to make it as efficient as possible. I currently use a path array to generate my fencing quickly. It works great when its straight lines but as soon as there is a curve, I can't get my blocks to stay linked. (cfr. image&lt;SPAN&gt;&amp;nbsp;)&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="Capture d'écran 2024-11-05 141809.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1432791iF0FB1BC388AF9C63/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture d'écran 2024-11-05 141809.png" alt="Capture d'écran 2024-11-05 141809.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any solution to force 2 points of the block to stay on the path ? The closest solution I could get is to set the base point on the middle of the block so I can get the tangent but it's not perfect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope I'm being clear, English is not my first language.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 09:48:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13145429#M7804</guid>
      <dc:creator>ColinRuy</dc:creator>
      <dc:date>2024-11-12T09:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create a path array with 2 points of the object on the curve</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13145932#M7805</link>
      <description>&lt;P&gt;Hello &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14406594"&gt;@ColinRuy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This should be possible using lisp. Please check this thread:&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/multiple-constraints-along-array-path/td-p/7096003" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/multiple-constraints-along-array-path/td-p/7096003&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 14:09:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13145932#M7805</guid>
      <dc:creator>vinodkl</dc:creator>
      <dc:date>2024-11-12T14:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create a path array with 2 points of the object on the curve</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13146023#M7806</link>
      <description>&lt;P&gt;There was also another very similar topic very recently, either here or in the Customization Forum, but I haven't found the right combination of Search terms to locate it....&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 14:48:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13146023#M7806</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-11-12T14:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create a path array with 2 points of the object on the curve</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13146361#M7807</link>
      <description>&lt;P&gt;I think the following should do what you want.&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="leeminardi_0-1731432065990.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1432973i3CDA2DBB29C9E9DD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="leeminardi_0-1731432065990.png" alt="leeminardi_0-1731432065990.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun C:BlocksOnSpline( / blockname delta d path osm endpar dToEnd n p1 p2)
;  Adds blocks along a spline with the base point and a secnd point of the blocck also on the spline.
; The second point is specified as a distance along the x acis of the block from the base point.
; L. Minardi 11/12/2024  
(command "ucs" "w")
(setvar 'osmode 0)
(setq blockname (getstring "\nEnter block name: "))
(setq delta (getreal
	      "\nEnter distance to second point on x axis of block: "
	    )
)
(setq
  d	 0
  path	 (car (entsel))
  endpar (vlax-curve-getEndParam path)
  osm	 (getvar 'osmode)
)
(setq dToEnd (vlax-curve-getDistAtParam path endpar)
      n	     (atoi (rtos (/ dToEnd delta) 2 2))
)
(setvar "cmdecho" 0)
(setq p1 (vlax-curve-getPointAtParam path 0))
(repeat	n
  (setq d (+ d delta))
  (setq p2 (vlax-curve-getPointAtDist path d))
  (command "-insert" blockname '(0 0 0) 1 1 0)
  (command "_align" "last" "" '(0 0 0) p1 '(1 0 0) p2 "" "n")
  (setq p1 p2)
)					; end repeat
(setvar 'osmode osm)
(setvar "cmdecho" 1)
(princ)
)


&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you need another parameter to specify the distance between the blocks?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 17:24:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13146361#M7807</guid>
      <dc:creator>leeminardi</dc:creator>
      <dc:date>2024-11-12T17:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create a path array with 2 points of the object on the curve</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13146673#M7808</link>
      <description>&lt;P&gt;How about implementing the cord length...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dividing-a-curve-equaly/m-p/10279075/highlight/true#M414635" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dividing-a-curve-equaly/m-p/10279075/highlight/true#M414635&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: Attached a version that creates a segmented curve by segments &lt;STRONG&gt;equally&lt;/STRONG&gt; long. Then could be created dynarray (between dist should be a little bit longer, say by .0001)&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 10:02:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13146673#M7808</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2024-11-13T10:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create a path array with 2 points of the object on the curve</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13149278#M7809</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;How about implementing the cord length...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dividing-a-curve-equaly/m-p/10279075/highlight/true#M414635" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dividing-a-curve-equaly/m-p/10279075/highlight/true#M414635&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: Attached a version that creates a segmented curve by segments &lt;STRONG&gt;equally&lt;/STRONG&gt; long. Then could be created dynarray (between dist should be a little bit longer, say by .0001)&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;, It seems like extra work for the user to create the array of blocks in two steps.&amp;nbsp; I got the following results referencing the segmented curve generated by your code and then used the ARRAY PATH.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="leeminardi_0-1731546366376.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1433598iAED21E43846A6295/image-size/medium?v=v2&amp;amp;px=400" role="button" title="leeminardi_0-1731546366376.png" alt="leeminardi_0-1731546366376.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's a second attempt using PSEGLENGTH but with a distance of 1.201 !&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="leeminardi_1-1731546661669.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1433599i1F7FA66580816D9B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="leeminardi_1-1731546661669.png" alt="leeminardi_1-1731546661669.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 01:14:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13149278#M7809</guid>
      <dc:creator>leeminardi</dc:creator>
      <dc:date>2024-11-14T01:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create a path array with 2 points of the object on the curve</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13149853#M7810</link>
      <description>&lt;P&gt;Lee, you're not very versed with this command, are you?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did not try to address this specific case — I just found that the original algorithm of the chord routine did not work very well for me, so I rewrote it to better suit my needs. If the OP finds it useful, it could be easily adjusted to this case.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 08:39:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13149853#M7810</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2024-11-14T08:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create a path array with 2 points of the object on the curve</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13160199#M7811</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/822616"&gt;@leeminardi&lt;/a&gt; and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;, I use a mix of both your commands and it works great. First I divide the curb with Bee's command, then I use Lee's to put the blocks on the divided spline. Dividing the spline first seems to correct the slight error I had using only Lee's command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank to you both !&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 14:13:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/create-a-path-array-with-2-points-of-the-object-on-the-curve/m-p/13160199#M7811</guid>
      <dc:creator>ColinRuy</dc:creator>
      <dc:date>2024-11-19T14:13:18Z</dc:date>
    </item>
  </channel>
</rss>

