See the top rated post in this thread. Click here

Results 1 to 6 of 6

Thread: Mirror placement of objects, but not the objects themselves?

  1. #1
    100 Club Julesagain's Avatar
    Join Date
    2005-06
    Location
    Atlanta
    Posts
    118
    Login to Give a bone
    0

    Default Mirror placement of objects, but not the objects themselves?

    I don't know if this is possible, but I thought I'd throw it out there. I have an array of assorted blocks, with the attributes edited, along a wire. They are all the exact same distance apart. The problem is, I lined them up in the opposite order from how they need to go. I was just wondering if there is a way to mirror the line-up without mirroring the actual objects themselves. I guess what I need is a MIRRTEXT for the objects. I hope this makes sense. There aren't that many, so I'm going to just move them where they need to go, but it sure would be handy if I had about 50 of them all in a line, and needed them to be lined up in the opposite direction!

    Thanks,
    Jules

  2. #2
    Certifiable AUGI Addict dzatto's Avatar
    Join Date
    2006-12
    Location
    Big "D"
    Posts
    3,711
    Login to Give a bone
    0

    Default Re: Mirror placement of objects, but not the objects themselves?

    The first thing that comes to mind is to create a dynamic block with a mirror command in it. That way, you could mirror all your blocks, then go through and hit the mirror grip for each one to flip it back where it should be.

    It's still a bit of work if you had 50 of them, but it would be quicker than placing them all again.

  3. #3
    Certifiable AUGI Addict dzatto's Avatar
    Join Date
    2006-12
    Location
    Big "D"
    Posts
    3,711
    Login to Give a bone
    1

    Default Re: Mirror placement of objects, but not the objects themselves?

    Just thought of something else even better that I think will work. You'll have to try it though.

    Mirror the entire string of blocks, which should put the attributes in the correct order. The problem would be that the block geometry is now mirrored. Just block edit one of the blocks, fix it, then save your changes. It should fix all the blocks at once. You might have to edit the block first.
    Last edited by dzatto; 2009-02-03 at 11:20 PM.

  4. #4
    All AUGI, all the time Richard.Kent's Avatar
    Join Date
    2001-01
    Location
    Albuquerque, NM, USA
    Posts
    622
    Login to Give a bone
    1

    Default Re: Mirror placement of objects, but not the objects themselves?

    Quote Originally Posted by julesagain View Post
    I don't know if this is possible, but I thought I'd throw it out there. I have an array of assorted blocks, with the attributes edited, along a wire. They are all the exact same distance apart. The problem is, I lined them up in the opposite order from how they need to go. I was just wondering if there is a way to mirror the line-up without mirroring the actual objects themselves. I guess what I need is a MIRRTEXT for the objects. I hope this makes sense. There aren't that many, so I'm going to just move them where they need to go, but it sure would be handy if I had about 50 of them all in a line, and needed them to be lined up in the opposite direction!

    Thanks,
    Jules

    Mirror them, pick them, go to properties and change the X scale from negative number to positive.
    Assuming you mirror along a zero degree line. I just tried it and it worked fine. Hopefully it will work in your exact application.

    You can also rotate them all and then use properties to change the rotation back.

  5. #5
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    1

    Default Re: Mirror placement of objects, but not the objects themselves?

    There might be a problem with the attributes. A normal mirror will place the attributes correctly & (with MIRRTEXT=0) will not mirror the attributes back-to-front.

    However, the change properties will disregard the MIRRTEXT variable. So your attributes will then get "mirrored" back-to-front. The usual way of fixing them, would then require ATTSYNC (or BATTMAN-->Sync). Unfortunately these would then also move, size & rotate all attributes to their defaults ... so if you've modified any attribute properties (font, size, rotation, etc.) or moved them using grip-edit, these changes would be lost.

  6. #6
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    1

    Default Re: Mirror placement of objects, but not the objects themselves?

    Just had a look if Lisp could help, try this one:
    Code:
    ;;; Mirror with blocks mirrored back again individualy
    (defun c:MirrorB (/ ss en ed n pt1 pt2 ang erase MirrBlock)
      (ErrorTrap '((("CMDECHO" . 0)) nil t))
      ;; Get selection of objects to mirror
      (setq ss (ssget))
    
      ;; Get mirror points
      (setq pt1 (getpoint "Specify first point of mirror line: ")
            pt2 (getpoint pt1 "Specify second point of mirror line: ")
      ) ;_ end of setq
    
      ;; Get erase original
      (initget "Yes No")
      (setq erase (getkword "\nErase source objects? [Yes/No] <N>: "))
    
      (setq en (entlast)) ;Get the last entity in the drawing (in case of No answer)
    
      ;; Perform normal mirror
      (command "._MIRROR" ss "" "_non" pt1 "_non" pt2 erase)
    
      (defun MirrBlock (en ed /)
        ;; Mirror block around its insertion point
        (command "._MIRROR"
                 en
                 ""
                 "_non"
                 (cdr (assoc 10 ed))
                 "_non"
                 (strcat "@100<<" (angtos ang))
                 "_Yes"
        ) ;_ end of command
      ) ;_ end of defun
    
      ;; Get the angle of mirror
      (setq ang (angle pt1 pt2))
    
      (if (= erase "Yes")
        (progn ;Step through selection
          (setq n 0) ;Initialize counter to zero
          (while (< n (sslength ss)) ;Step through all entities in selection
            (setq en (ssname ss n) ;Get nth entity in selection
                  ed (entget en) ;And its data
            ) ;_ end of setq
            ;; Check if block
            (if (= "INSERT" (cdr (assoc 0 ed)))
              (MirrBlock en ed) ;Mirror the block about its insertion point
            ) ;_ end of if
            (setq n (1+ n)) ;Increment counter
          ) ;_ end of while
        ) ;_ end of progn
        (progn ;Else step through new objects
          (setq en (entnext en)) ;Get next new object after the mirror command
          (while en ;While there's a new object
            (setq ed (entget en)) ;Get its data
            ;; Check if block
            (if (= "INSERT" (cdr (assoc 0 ed)))
              (MirrBlock en ed) ;Mirror the block about its insertion point
            ) ;_ end of if
            (setq en (entnext en)) ;Get the following new object
          ) ;_ end of while
        ) ;_ end of progn
      ) ;_ end of if
    
      (ErrorTrap nil)
      (princ)
    ) ;_ end of defun
    Command is MirrorB, it works the same as the normal Mirror, but then mirrors each block around its insertion point again.

    And save the attached file somewhere so it's loaded before the above. This is simply my error handling (in case the user presses Esc).
    Attached Files Attached Files

Similar Threads

  1. Ability to snap to all objects in a 3D view, not just objects on the current reference plane
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 0
    Last Post: 2010-03-12, 06:09 AM
  2. Linking att fields to objects after placement
    By cadpoobah in forum AutoLISP
    Replies: 0
    Last Post: 2007-05-16, 08:52 PM
  3. Moving Text Objects relative to base point as other Objects are moved / scaled
    By William Troeak in forum Dynamic Blocks - Technical
    Replies: 7
    Last Post: 2007-02-06, 02:35 PM
  4. Is it possible to Mirror Objects in Viewports
    By methost in forum AutoCAD General
    Replies: 6
    Last Post: 2006-06-13, 03:02 PM
  5. Mirror Objects Along 2 Axis....HELP..!
    By CADdancer in forum AutoLISP
    Replies: 2
    Last Post: 2004-10-01, 11:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •