<?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: Move Blocks vertically by using lisp in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8109210#M102855</link>
    <description>&lt;P&gt;[That's an explanation of where it's coming from, but it doesn't answer my questions.]&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jul 2018 11:59:39 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2018-07-04T11:59:39Z</dc:date>
    <item>
      <title>Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8103679#M102849</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I need some help for moving of Blocks automatically by using Lisp. Please find the attached drawing for your reference (Before &amp;amp; After). I have provided only two blocks in drawing. But i have to clean so many blocks like this by manually.&lt;/P&gt;&lt;P&gt;At this location only two blocks are overlapping, but some times they may come around 8 also.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help anyone. If i have lisp i can save so much time for clean up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Sai.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 06:03:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8103679#M102849</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-02T06:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8104381#M102850</link>
      <description>&lt;PRE&gt;;;MV = Move vertically constrained.&lt;BR /&gt;(defun C:MV (/ SS P1 P2) ;D. C. Broad, Jr. (select objects and pick 2 points)
  (setq SS (ssget))			;SELECT OBJECTS TO MOVE
  (setq P1 (getpoint "\nFrom point: "))
  (setq P2 (getpoint "\NTo point: "))
  (setq P2 (cons (car P1) (cdr P2)))
  (command "MOVE" SS "" "NON" P1 "NON" P2)
  (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Jul 2018 12:55:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8104381#M102850</guid>
      <dc:creator>dbroad</dc:creator>
      <dc:date>2018-07-02T12:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8104467#M102851</link>
      <description>&lt;P&gt;Do you want the group of them always vertically centered on the original position as they are in the drawing?&amp;nbsp; In your example, &lt;EM&gt;both&lt;/EM&gt;&amp;nbsp; are moved, but if there are an &lt;EM&gt;odd&lt;/EM&gt;&amp;nbsp; number of them, do you want one left where they all start, and&amp;nbsp;others moved up and&amp;nbsp;down around it?&amp;nbsp; Or is that just the way the drawing is, and a routine could leave one in place and move all the rest in the same direction?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does it matter what &lt;EM&gt;order&lt;/EM&gt;&amp;nbsp; they're stacked in?&amp;nbsp; Can that be random, or should it be determined by the value in one or another of the Attributes, or maybe by drawing order, or ... ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are they always Blocks of the &lt;EM&gt;same size &lt;/EM&gt;&amp;nbsp;in the vertical direction, so that the amount of movement can be built into a routine, or might they sometimes be other sizes, so that the amount of movement needs to be calculated?&amp;nbsp; If so,&amp;nbsp;would they&amp;nbsp;always all be the same size as each other?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 13:19:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8104467#M102851</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-07-02T13:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8108260#M102852</link>
      <description>&lt;P&gt;Thank you Dbroad for providing me Lisp.&lt;/P&gt;&lt;P&gt;But, actually I'm expecting a Lisp to move all blocks automatically without manual movement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my drawings the same size blocks are overlapping when I'm converting the mapinfo data to Auto CAD drawing.&lt;/P&gt;&lt;P&gt;After converting, the blocks which are assigned to particular object will overlap on each block at the same location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, for Object 1 i will assign two codes in mapinfo and for object 2 i will assign 6 codes. when I convert the data to CAD, the blocks are overlapping in CAD. if those 2 or more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you understand my query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me to automate this.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sai.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jul 2018 02:01:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8108260#M102852</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-04T02:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8108264#M102853</link>
      <description>&lt;P&gt;Hi Kent,&lt;/P&gt;&lt;P&gt;Thank you for your response. I explained my problem in the below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my drawings the same size blocks are overlapping when I'm converting the mapinfo data to Auto CAD drawing.&lt;/P&gt;&lt;P&gt;After converting, the blocks which are assigned to particular object will overlap on each block at the same location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, for Object 1 i will assign two codes in mapinfo and for object 2 i will assign 6 codes. when I convert the data to CAD, the blocks are overlapping in CAD. if those 2 or more&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sai.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jul 2018 02:04:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8108264#M102853</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-04T02:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8108947#M102854</link>
      <description>Any chance you can post the drawing in 2010 format?</description>
      <pubDate>Wed, 04 Jul 2018 09:54:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8108947#M102854</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2018-07-04T09:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8109210#M102855</link>
      <description>&lt;P&gt;[That's an explanation of where it's coming from, but it doesn't answer my questions.]&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jul 2018 11:59:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8109210#M102855</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-07-04T11:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8116546#M102856</link>
      <description>&lt;P&gt;Please Find the attached Drawing in 2010 format.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sai.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jul 2018 22:45:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8116546#M102856</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-08T22:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8119734#M102857</link>
      <description>&lt;P&gt;OK, try this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Command is SHIFTBLOCK and it will stack blocks which have the &lt;U&gt;SAME&lt;/U&gt; insertion point. So it will currently not solve overlapping blocks with different insertion points.&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="ShiftBlock.gif" style="width: 978px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/521145iE75C9262F35ED0B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="ShiftBlock.gif" alt="ShiftBlock.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:ShiftBlock (/ GetBlockReferences GetBlockInsertions SB_UsedPointList SB_BlockDef SB_BlockInsertion SB_BLOCKSFOUND SB_Entity SB_Fuzz SB_Heigth SB_Object SB_Point1 SB_Point2)

   (defun GetBlockReferences (GBR_BlockObject)
      (if
         (and
            (= (type GBR_BlockObject) 'VLA-OBJECT)
            (= (vla-get-ObjectName GBR_BlockObject) "AcDbBlockTableRecord")
         )
         (vl-remove-if
            'not
            (mapcar
               'vlax-ename-&amp;gt;vla-object
               (mapcar
                  'cdr
                  (vl-remove-if-not
                     '(lambda (GBR_Item) (= (car GBR_Item) 331))
                     (entget (vlax-vla-object-&amp;gt;ename GBR_BlockObject))
                  )
               )
            )
         )
      )
   )

   (defun GetBlockInsertions (GBI_BlockName / GBI_BlockName GBI_Return)
      (if
         (= (type GBI_BlockName) 'STR)
         (progn
            (setq GBI_BlockName (strcase GBI_BlockName))
            (vlax-for GBI_Object (vla-get-Block (vla-get-ActiveLayout (vla-get-ActiveDocument (vlax-get-acad-object))))
               (if
                  (and
                     (= (vla-get-ObjectName GBI_Object) "AcDbBlockReference")
                     (= (strcase (vla-get-EffectiveName GBI_Object)) GBI_BlockName)
                  )
                  (setq GBI_Return (cons GBI_Object GBI_Return))
               )
            )
         )
      )
      GBI_Return
   )
   
   (if      
      (and
         (not (initget "Name"))
         (setq SB_Entity (entsel "\nSelect object [Name]: "))
         (or
            (and
               (= SB_Entity "Name")
               (setq SB_BlockName (getstring T "\nBlockname: "))
               (/= SB_BlockName "")
               (not (vl-catch-all-error-p (setq SB_BlockDef (vl-catch-all-apply 'vla-item (list (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-acad-object))) SB_BlockName)))))
            )
            (and
               (/= SB_Entity "Name")
               (= (vla-get-ObjectName (setq SB_Object (vlax-ename-&amp;gt;vla-object (car SB_Entity)))) "AcDbBlockReference")
               (not (vl-catch-all-error-p (setq SB_BlockDef (vl-catch-all-apply 'vla-item (list (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-acad-object))) (vla-get-EffectiveName SB_Object))))))                 
            )
         )
         (= (vla-get-IsLayout SB_BlockDef) :vlax-false)
         (= (vla-get-IsXref   SB_BlockDef) :vlax-false)
         (or
            (and
               (= (vla-get-IsDynamicBlock SB_BlockDef) :vlax-false)
               (setq SB_BlocksFound (GetBlockReferences SB_BlockDef))
            )
            (and
               (= (vla-get-IsDynamicBlock SB_BlockDef) :vlax-true)
               (setq SB_BlocksFound (GetBlockInsertions (vla-get-Name SB_BlockDef)))
            )
         )                        
      )
      (progn
         (vla-StartUndoMark (vla-get-ActiveDocument (vlax-get-acad-object)))
         (setq SB_Fuzz 1e-3)
         (foreach SB_Block SB_BlocksFound
            (if
               (not SB_Heigth)
               (progn
                  (vla-GetBoundingBox SB_Block 'SB_Point1 'SB_Point2)
                  (setq SB_Heigth
                     (-
                        (nth 1 (vlax-safearray-&amp;gt;list SB_Point2))
                        (nth 1 (vlax-safearray-&amp;gt;list SB_Point1))
                     )
                  )
               )
            )            
            (setq SB_BlockInsertion (vlax-safearray-&amp;gt;list (vlax-variant-value (vla-get-InsertionPoint SB_Block))))
            (if
               (vl-remove-if-not '(lambda (SB_CheckPoint) (equal SB_CheckPoint SB_BlockInsertion SB_Fuzz)) SB_UsedPointList) 
               (progn
                  (while
                     (vl-remove-if-not '(lambda (SB_CheckPoint) (equal SB_CheckPoint SB_BlockInsertion SB_Fuzz)) SB_UsedPointList)
                     (setq SB_BlockInsertion (list (nth 0 SB_BlockInsertion) (+ (nth 1 SB_BlockInsertion) SB_Heigth) (nth 2 SB_BlockInsertion)))
                  )
                  (vla-put-InsertionPoint SB_Block (vlax-3d-point SB_BlockInsertion))
               )
            )              
            (setq SB_UsedPointList (cons SB_BlockInsertion SB_UsedPointList))            
         )
         (vla-EndUndoMark (vla-get-ActiveDocument (vlax-get-acad-object))) 
      )
      (princ "\n ** No block selected or block name doesn't exist!")
   )
   (princ)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 07:38:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8119734#M102857</guid>
      <dc:creator>DannyNL</dc:creator>
      <dc:date>2018-07-10T07:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8121969#M102858</link>
      <description>&lt;P&gt;Thank you Danny...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is a great help to me..I really appreciate your great work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much. The lisp saves so much of time for me.&lt;/P&gt;&lt;P&gt;Thanks again...&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sai.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 00:47:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8121969#M102858</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-11T00:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8122282#M102859</link>
      <description>&lt;P&gt;You're welcome &amp;amp; glad I could help&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 06:49:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8122282#M102859</guid>
      <dc:creator>DannyNL</dc:creator>
      <dc:date>2018-07-11T06:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8127746#M102860</link>
      <description>&lt;P&gt;Hi Danny,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good Day!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;am requesting&amp;nbsp;one more help about these Blocks Overlapping. Some of the Blocks are not overlapping at the Intersection Point. Could you please help me is there any possibility to clear the blocks overlapping regardless of intersection point and Block name also.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sai.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2018 05:25:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8127746#M102860</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-13T05:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8213046#M102861</link>
      <description>&lt;P&gt;Hi Danny,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Could you please provide any update on the request.&lt;/P&gt;&lt;P&gt;Thanks for your Help....&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sai.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 06:01:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8213046#M102861</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-21T06:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8772853#M102862</link>
      <description>&lt;P&gt;Is it possible to have it where you can select multiple blocks and have it put into a list with different insertion points?&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 11:34:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8772853#M102862</guid>
      <dc:creator>kheck6VR8C</dc:creator>
      <dc:date>2019-05-06T11:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8773076#M102863</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... Some of the Blocks are not overlapping at the Intersection Point. Could you please help me is there any possibility to clear the blocks overlapping regardless of intersection point and Block name also.&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, it's been a while, but since this thread has been revived....&amp;nbsp; Here's a routine that will do that.&amp;nbsp; It accepts Blocks of any&amp;nbsp;name(s), and their insertion points are irrelevant [it uses their bounding boxes].&amp;nbsp; It leaves whatever turns out to be the first in the selection set where it was, and moves all others&amp;nbsp;vertically, leaving&amp;nbsp;each one&amp;nbsp;where it is in the X direction and&amp;nbsp;putting the bottom of&amp;nbsp;its extents &lt;FONT color="#ff0000"&gt;1&lt;/FONT&gt; drawing unit higher than the top of the extents of the previous Block -- &lt;FONT color="#ff0000"&gt;EDIT&lt;/FONT&gt; that number if 1 drawing unit is not desired [for example, zero&amp;nbsp;to have&amp;nbsp;them touching if they overlap in the X direction].&amp;nbsp; Depending on the positional relationship of the selected Blocks, that can sometimes mean that a given Block will be moved &lt;EM&gt;downward&lt;/EM&gt; &amp;nbsp;instead of upward.&amp;nbsp; Minimally tested.&lt;/P&gt;
&lt;PRE&gt;(defun C:SBY (/ ss n blk minpt maxpt LL UR); = Stack Blocks in Y direction
  (if (setq ss (ssget '((0 . "INSERT"))))
    (repeat (setq n (sslength ss))
      (setq blk (ssname ss (setq n (1- n))))
      (vla-getboundingbox (vlax-ename-&amp;gt;vla-object blk) 'minpt 'maxpt)
      (setq LL (vlax-safearray-&amp;gt;list minpt))
      (if refY
        (progn ; then
          (command "_.move" blk ""
            "_none" LL
            "_none" (list (car LL) (+ refY &lt;FONT color="#ff0000"&gt;1&lt;/FONT&gt;)); separate vertically by 1 d.u.&amp;lt;--&lt;FONT color="#ff0000"&gt;EDIT&lt;/FONT&gt; as desired
          ); command
          (vla-getboundingbox (vlax-ename-&amp;gt;vla-object blk) 'minpt 'maxpt)
          (setq refY (cadr (vlax-safearray-&amp;gt;list maxpt))); move refY up
        ); progn
        (setq refY (cadr (vlax-safearray-&amp;gt;list maxpt))); else
      ); if
    ); repeat
  ); if
  (princ)
); defun
(vl-load-com); if needed&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 May 2019 13:03:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8773076#M102863</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-05-06T13:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8773089#M102864</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7175943"&gt;@kheck6VR8C&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is it possible to have it where you can select multiple blocks and have it put into a list with different insertion points?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That seems a very different question from the topic of this thread.&amp;nbsp; Does it deserve a new one?&amp;nbsp; And if you start a new one, post an example of the format of the list you would want.&amp;nbsp; Also, would that be simply reported as a list to the User in the command line?&amp;nbsp; Or drawn into the drawing somehow?&amp;nbsp; If so, as multiple Text objects?&amp;nbsp; One Mtext object?&amp;nbsp; A Table?&amp;nbsp; Or sent to an external file?&amp;nbsp;&amp;nbsp;If so, a&amp;nbsp;plain text file?&amp;nbsp; A spreadsheet file?&amp;nbsp; Etc., etc.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 13:07:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8773089#M102864</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-05-06T13:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8773118#M102865</link>
      <description>&lt;P&gt;It's essentially the same topic but the question is, can you have them align vertically on top of each other instead of having them not be stacked vertically? You mentioned it doesn't take into account the insertion point but the boundary of the block so I was just curious if it could be stacked based upon the insertion point.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 13:20:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8773118#M102865</guid>
      <dc:creator>kheck6VR8C</dc:creator>
      <dc:date>2019-05-06T13:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8773278#M102866</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7175943"&gt;@kheck6VR8C&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It's essentially the same topic but the question is, can you have them align vertically on top of each other instead of having them not be stacked vertically? You mentioned it doesn't take into account the insertion point but the boundary of the block so I was just curious if it could be stacked based upon the insertion point.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do I understand correctly that by "list" in your previous Message you meant&amp;nbsp;the word in this Message --&amp;nbsp;"stack" -- in terms of position in the drawing?&amp;nbsp; [The word "list" has a specific meaning in AutoLisp terminology, &lt;EM&gt;quite different from that&lt;/EM&gt;, which is where my brain went.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And am I correct that "stacked based upon the insertion point" means with their insertion points would be vertically aligned, regardless of where those fall in relation to each Block's drawn contents?&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 14:16:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8773278#M102866</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-05-06T14:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8773282#M102867</link>
      <description>&lt;P&gt;Yes, that is what I meant is "stacked" based upon insertion point. Sorry for the confusion.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 14:18:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8773282#M102867</guid>
      <dc:creator>kheck6VR8C</dc:creator>
      <dc:date>2019-05-06T14:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Move Blocks vertically by using lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8773375#M102868</link>
      <description>&lt;P&gt;Try this [again, minimally tested]:&lt;/P&gt;
&lt;PRE&gt;(defun C:&lt;FONT color="#000000"&gt;&lt;STRONG&gt;SBYI&lt;/STRONG&gt;&lt;/FONT&gt; (/ ss n blk minpt maxpt LL UR insX refY)
  &lt;FONT color="#00ccff"&gt;; = &lt;FONT color="#000000"&gt;&lt;STRONG&gt;S&lt;/STRONG&gt;&lt;/FONT&gt;tack &lt;FONT color="#000000"&gt;&lt;STRONG&gt;B&lt;/STRONG&gt;&lt;/FONT&gt;locks in &lt;FONT color="#000000"&gt;&lt;STRONG&gt;Y&lt;/STRONG&gt;&lt;/FONT&gt; direction -- &lt;FONT color="#000000"&gt;&lt;STRONG&gt;I&lt;/STRONG&gt;&lt;/FONT&gt;nsertion points aligned&lt;/FONT&gt;
  (if (setq ss (ssget '((0 . "INSERT"))))
    (repeat (setq n (sslength ss))
      (setq blk (ssname ss (setq n (1- n))))
      (vla-getboundingbox (vlax-ename-&amp;gt;vla-object blk) 'minpt 'maxpt)
      (setq LL (vlax-safearray-&amp;gt;list minpt))
      (if insX
        (progn ; then [subsequent one(s)]
          (command "_.move" blk ""
            "_none" (list (cadr (assoc 10 (entget blk))) (cadr LL))
            "_none" (list insX (+ refY &lt;FONT color="#ff0000"&gt;1&lt;/FONT&gt;)); separate vertically by &lt;FONT color="#ff0000"&gt;1&lt;/FONT&gt; drawing unit&amp;lt;--&lt;FONT color="#ff0000"&gt;EDIT&lt;/FONT&gt; as desired
          ); command
          (vla-getboundingbox (vlax-ename-&amp;gt;vla-object blk) 'minpt 'maxpt)
          (setq refY (cadr (vlax-safearray-&amp;gt;list maxpt))); move refY up
        ); progn
        (setq ; else [first one]
          insX (cadr (assoc 10 (entget blk)))
          refY (cadr (vlax-safearray-&amp;gt;list maxpt))
        ); setq
      ); if
    ); repeat
  ); if
  (princ)
); defun
(vl-load-com); if needed&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 May 2019 14:53:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-blocks-vertically-by-using-lisp/m-p/8773375#M102868</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-05-06T14:53:23Z</dc:date>
    </item>
  </channel>
</rss>

