Mirror Blocks

Discussion in 'AutoCAD' started by Tim, Oct 25, 2004.

  1. Tim

    Tim Guest

    I have looked at everything I have and do not see what I need so I am asking
    here.
    Does anybody have a block mirror routine that will mirror selected blocks
    based on either the insertion point or the midpoint of the block.
    Thanks for any and all help.

    Tim W.
     
    Tim, Oct 25, 2004
    #1
  2. Tim

    T.Willey Guest

    Tim,

    Here is one I use to rotate blocks about there insertion point. You could modify it to meet your needs.

    Tim

    (defun c:bro(/ os1 ln2 bk1 ln1 rot1)

    (setvar "cmdecho" 0)
    (setq os1(getvar "osmode"))

    (command "undo" "group")
    (command "ucs" "")
    (command "osmode" 0)
    (setq ln2 0)
    (prompt "\nSelect blocks to rotate:")
    (setq bk1(ssget '((0 . "Insert"))))
    (setq ln1(sslength bk1))
    (setq rot1(getreal"\nAngle of rotation:"))
    (rot)
    (setvar "osmode" os1)
    (command "ucs" "p")
    (command "undo" "end")
    (princ)
    )


    (defun rot(/ ed1 pt1)
    (while (/= ln2 ln1)
    (setq ed1(entget (ssname bk1 ln2)))
    (setq pt1(cdr (assoc 10 ed1)))
    (command "rotate" (ssname bk1 ln2)"" pt1 rot1)
    (setq ln2 (+ ln2 1))
    )
    )
     
    T.Willey, Oct 25, 2004
    #2
  3. Tim

    Bill DeShawn Guest

    Bill DeShawn, Oct 26, 2004
    #3
  4. Tim

    Bill DeShawn Guest

    The routine unmirrors blocks that are mirrored. It comes in very handy when
    you mirror blocks that have text in them such as exhaust fans and smoke
    detectors in floor plans. You may modify it to suit your needs, or study it
    to make your own routine.
     
    Bill DeShawn, Oct 26, 2004
    #4
  5. Tim

    Tim Guest

    You know without even knowing, you actually gave me exactly what I
    needed..for exactly the same reason you probably use the routine..
    We have to mirror a school and of course the callouts (exhaust fans) etc.
    are not going to look right until you fix them.

    Thanks a bunch

    Tim w.
     
    Tim, Oct 26, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.