<?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 Move block along polyline with it's base point in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8903546#M86572</link>
    <description>&lt;P&gt;Lisp to move block along polyline with it's base point &amp;amp; specify distance..........&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cad tutor.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/656502i7E2F7C8E59110319/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cad tutor.jpg" alt="Cad tutor.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jul 2019 12:31:12 GMT</pubDate>
    <dc:creator>Automohan</dc:creator>
    <dc:date>2019-07-11T12:31:12Z</dc:date>
    <item>
      <title>Move block along polyline with it's base point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8903546#M86572</link>
      <description>&lt;P&gt;Lisp to move block along polyline with it's base point &amp;amp; specify distance..........&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cad tutor.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/656502i7E2F7C8E59110319/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cad tutor.jpg" alt="Cad tutor.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 12:31:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8903546#M86572</guid>
      <dc:creator>Automohan</dc:creator>
      <dc:date>2019-07-11T12:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Move block along polyline with it's base point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8903592#M86573</link>
      <description>&lt;P&gt;Perhaps a sample drawing (AutoCAD 2010) with the block and polyline would help. It's impossible to code without knowing the block name and its basepoint and definition orientation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 12:44:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8903592#M86573</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2019-07-11T12:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Move block along polyline with it's base point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8903641#M86574</link>
      <description>&lt;P&gt;After running the program it should ask for "select block" through the block it will identify the base point &amp;amp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it should ask for "select polyline" then this programme will be useful for many people.......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;otherwise say block name is "Hump"&lt;/P&gt;&lt;P&gt;Path is always polyline only (no lines, arcs or circles)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 12:57:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8903641#M86574</guid>
      <dc:creator>Automohan</dc:creator>
      <dc:date>2019-07-11T12:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Move block along polyline with it's base point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8904360#M86575</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3182964"&gt;@Automohan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;After running the program it should ask for "select block" through the block it will identify the base point &amp;amp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it should ask for "select polyline" then this programme will be useful for many people.......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;otherwise say block name is "Hump"&lt;/P&gt;&lt;P&gt;Path is always polyline only (no lines, arcs or circles)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That doesn't tell me the relationship of the base point in relation to the rest of the block, or how the orientation of the block needs to be altered as it moves along the polyline, and it tells me nothing about the relationship of the block to the polyline.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 17:16:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8904360#M86575</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2019-07-11T17:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Move block along polyline with it's base point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8905308#M86576</link>
      <description>&lt;P&gt;It is easy using VL lisp here is a chainage lisp that is a good starting point replace the add text&amp;nbsp; with insert your block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will see if I can find time.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 04:23:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8905308#M86576</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-07-12T04:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Move block along polyline with it's base point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8905575#M86577</link>
      <description>&lt;P&gt;Hi, this could be enough to start.&lt;/P&gt;
&lt;P&gt;I have many routines upon 'along path' subject like the one below -- I might do something more complex some time...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)

(defun c:CopyAlongPolyline ( / en pl pt p1 p2 lst) ;Move Along Line
  (if (and (setq en (car (entsel "\nSelect object to copy: ")))
	   (setq pl (car (nentsel "\nSelect path: ")))
	   (wcmatch (cdr (assoc 0 (entget pl))) "*LINE,ARC,CIRCLE,RAY")
	   (wcmatch (cdr (assoc 0 (entget pl))) "~MLINE")
	   (setq p1 (trans (vlax-curve-getClosestPointTo pl (cdr (assoc 10 (entget en)))) 0 1)) ; p1 ucs
           (princ "\nSelect objects to define destinations (point/circles/blocks) &amp;lt;pick&amp;gt;: ")
           (or (and (setq lst (ssget '((0 . "POINT,INSERT,CIRCLE"))))
		    (setq lst  (mapcar '(lambda (e) (trans (cdr (assoc 10 (entget e))) 0 1))
				       (vl-remove-if 'listp (mapcar 'cadr (ssnamex lst))))))
	       (while (setq p2 (getpoint "\nDestination point: " p1))
		 (setq lst (cons (trans p2 1 0) lst)))
	       lst)
	   )
    (foreach p lst
      (command "_.COPY" en ""
	     "_none" p1 ; ucs
	     "_none" p

	     "_.MOVE" "_l" "" 
	     "_none" (setq pt (getvar 'LASTPOINT)) ; pt ucs
	     "_none" (setq p2 (trans (vlax-curve-getClosestPointTo pl (trans pt 1 0)) 0 1)) ; p2 ucs

	     "_.ROTATE" "_l" ""
	     "_none" p2
	     "_Reference"
	     '(0 0 0) ; wcs
	     (vlax-curve-getFirstDeriv pl (vlax-curve-getParamAtPoint pl (trans p1 1 0))) ; wcs
	     "_Points"
	     '(0 0 0) ; wcs
	     (vlax-curve-getFirstDeriv pl (vlax-curve-getParamAtPoint pl (trans p2 1 0))) ; wcs
	     )))
  (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Jul 2019 08:01:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8905575#M86577</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2019-07-12T08:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Move block along polyline with it's base point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8906793#M86578</link>
      <description>&lt;P&gt;Can you &lt;SPAN&gt;slightly&lt;/SPAN&gt; modify the program according to my little more requirement.....&lt;/P&gt;&lt;P&gt;This is placing at pick point, add for specify distance also....&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cad tutor1.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/657048i5CC48B0D6AF2D736/image-size/large?v=v2&amp;amp;px=999" role="button" title="cad tutor1.jpg" alt="cad tutor1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 17:53:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8906793#M86578</guid>
      <dc:creator>Automohan</dc:creator>
      <dc:date>2019-07-12T17:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Move block along polyline with it's base point</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8907305#M86579</link>
      <description>&lt;P&gt;My version a bit simpler but only accepts plines. No error checks.&lt;/P&gt;&lt;PRE&gt;; Insert a block at a distance along a pline
; By Alan H July 2019

(defun alg-ang (obj pnt)
  (angle '(0. 0. 0.)
     (vlax-curve-getfirstderiv
       obj
       (vlax-curve-getparamatpoint
         obj
         pnt
       )
     )
  )
)

(defun c:AHINS ( / obj dist pt oldang)
(setq oldang (getvar 'aunits))
(setvar 'aunits 3)
(setq obj (vlax-ename-&amp;gt;vla-object (car (entsel "pick object"))))
(if (= (vla-get-entityname obj) "AcDbPolyline")
(progn
(setq dist (getreal "Enter distance"))
(setq bname (getstring "Enter blockname "))
(setq pt (vlax-curve-getpointatdist obj dist))
(setq ang (alg-ang obj pt))
(command "-insert" bname pt 1 1 ang)
)
(alert "You have not picked a pline")
)
(setvar 'aunits oldang)
(princ)
)
(c:ahins )&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2019 01:26:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-block-along-polyline-with-it-s-base-point/m-p/8907305#M86579</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-07-13T01:26:09Z</dc:date>
    </item>
  </channel>
</rss>

