<?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: Batch Align multiple objects in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9831610#M68341</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9844534"&gt;@rponsell&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Essentially, I want to use the align command multiple times without the need to repeat the command. Pick one point on each object and give them each a separate destination.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Command: MULTIPLE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;Enter command name to repeat: align&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;it will start the command immediately and continue until you done want it anymore&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Try it&lt;/FONT&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, 29 Oct 2020 06:02:12 GMT</pubDate>
    <dc:creator>pbejse</dc:creator>
    <dc:date>2020-10-29T06:02:12Z</dc:date>
    <item>
      <title>Batch Align multiple objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9831188#M68339</link>
      <description>&lt;P&gt;Is there a way to use LISP or macro to align multiple objects to multiple other objects?&lt;/P&gt;&lt;P&gt;In the Sample.dwg I have 6 rectangles: 1, 2, 3, A, B, and C. I have shown what I would be starting with and what I would like to to look like when finished (rectangles A, B, C on top of 1, 2, 3).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially, I want to use the align command multiple times without the need to repeat the command. Pick one point on each object and give them each a separate destination.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ryan&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 22:24:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9831188#M68339</guid>
      <dc:creator>rponsell</dc:creator>
      <dc:date>2020-10-28T22:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Align multiple objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9831316#M68340</link>
      <description>&lt;P&gt;This is a simple approach say as a start. I can see a real dwg being a lot more complex than just 1=A and so on this could be done but what happens when no B ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:stack ( / obj point1min point2min point2max point2max ss)
(while (setq ent1 (entsel "\nPick 1st object Enter to exit"))
	(setq obj (vlax-ename-&amp;gt;vla-object (car ent1)))
		(vla-GetBoundingBox obj 'minpoint 'maxpoint)
		(setq point1min (vlax-safearray-&amp;gt;list minpoint))
		(setq point1max (vlax-safearray-&amp;gt;list maxpoint))
	(setq ent2 (entsel "\nPick object to move "))
		(setq obj (vlax-ename-&amp;gt;vla-object (car ent2)))
		(vla-GetBoundingBox obj 'minpoint 'maxpoint)
		(setq point2min (vlax-safearray-&amp;gt;list minpoint))
		(setq point2max (vlax-safearray-&amp;gt;list maxpoint))
		(setq ss (ssget "W" point2min point2max))
	(command "move" ss "" point2min (list (car point1min)(cadr point1max)))
)
(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 23:50:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9831316#M68340</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-10-28T23:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Align multiple objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9831610#M68341</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9844534"&gt;@rponsell&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Essentially, I want to use the align command multiple times without the need to repeat the command. Pick one point on each object and give them each a separate destination.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Command: MULTIPLE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;Enter command name to repeat: align&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;it will start the command immediately and continue until you done want it anymore&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Try it&lt;/FONT&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, 29 Oct 2020 06:02:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9831610#M68341</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2020-10-29T06:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Align multiple objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9831688#M68342</link>
      <description>&lt;P&gt;Not sure whether your sample drawing is just too much simplified, but I would simply &lt;STRONG&gt;MOVE&lt;/STRONG&gt; the objects.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 07:37:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9831688#M68342</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2020-10-29T07:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Align multiple objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9832277#M68343</link>
      <description>&lt;P&gt;You might find our app &lt;A href="https://jtbworld.com/jtb-align-plus" target="_blank" rel="noopener"&gt;JTB Align Plus&lt;/A&gt; helpful.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 13:09:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9832277#M68343</guid>
      <dc:creator>JTBWorld</dc:creator>
      <dc:date>2020-10-29T13:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Align multiple objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9832387#M68344</link>
      <description>&lt;P&gt;I forgot all about the MULTIPLE command. It does increase my workflow, and I'm going to count this as a solution. I am still interested in finding a way to select all the objects at once, then using the ALIGN or MOVE commands on each item in the selection set separately rather than the whole set. I basically want to eliminate the step when using MULTIPLE -&amp;gt; ALIGN/MOVE and having to select a new object each time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That may be being too picky though, lol. MULTIPLE works great. Thanks for the reminder!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ryan&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 13:48:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9832387#M68344</guid>
      <dc:creator>rponsell</dc:creator>
      <dc:date>2020-10-29T13:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Align multiple objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9832393#M68345</link>
      <description>&lt;P&gt;I forgot all about the MULTIPLE command. It does increase my workflow, and I'm going to count this as a solution. I am still interested in finding a way to select all the objects at once, then using the ALIGN or MOVE commands on each item in the selection set separately rather than the whole set. I basically want to eliminate the step when using MULTIPLE -&amp;gt; ALIGN/MOVE and having to select a new object each time.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 13:47:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9832393#M68345</guid>
      <dc:creator>rponsell</dc:creator>
      <dc:date>2020-10-29T13:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Align multiple objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9832434#M68346</link>
      <description>&lt;P&gt;How about something like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:MoveR ( / p e)
  (while (setq p (getpoint "\nSource ref point: "))
    (if (or (setq e (car (nentselp p)))
	    (and (setq e (car (entsel "\nNOT SELECTED, select manually: ")))
		 (setq p (getpoint "\nSource ref point: "))))
      (command-s "_.move" e "" p)))
  (princ)
  )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will work if your ref. points are laying ON an object to move. Then the object is selected automatically.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 14:09:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9832434#M68346</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2020-10-29T14:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Align multiple objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9832471#M68347</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9844534"&gt;@rponsell&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;... I want to use the align command multiple times without the need to repeat the command. Pick one point on each object and give them each a separate destination.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am still interested in finding a way to select all the objects at once, then using the ALIGN or MOVE commands on each item in the selection set separately rather than the whole set. ....&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If they're already oriented correctly as in the sample drawing, so that MOVE will do instead of ALIGN, and if those letters are only for identification and not part of what you want to reposition, then here's another way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:MultiMove (/ ss n)
  (prompt "\nTo Move a selected set of objects, each individually,")
  (if (setq ss (ssget "_:L")); [reject things on locked Layers]
    (repeat (setq n (sslength ss))
      (command "_.move" (ssname ss (setq n (1- n))) "" pause pause)
    ); repeat
  ); if
  (princ)
); defun&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Each one is selected/highlighted so you can see which one it's Moving as it steps through.&amp;nbsp; Pick your "one point on each object" and then its "separate destination."&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 14:27:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-align-multiple-objects/m-p/9832471#M68347</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-10-29T14:27:27Z</dc:date>
    </item>
  </channel>
</rss>

