Jump to content

UnMirror - Rotate to 0


rcb007

Recommended Posts

I was looking around and did not know if there was a routine that could unmirror selected blocks then possibly rotate them back to 0?

 

I have been inserting the blocks that have been mirrored for a long time. lol

 

Thanks for any help.

Link to comment
Share on other sites

To set the rotation horizontal try: https://forums.augi.com/showthread.php?171018-rotate-text-to-horizontal-in-viewport&p=1332928&viewfull=1#post1332928

As far as blocks being mirrored look for negative scale values in the Properties Palette.

 

Why not use annotative blocks and set Match Orientation to Yes? 

That way even in twisted views the blocks will always be horizontal.

  • Like 1
Link to comment
Share on other sites

Here is a simple bit of code that will do it.

(defun c:UnmirrorBlock (/ ss en xscl yscl zscl)
  (if (setq ss (ssget '((0 . "INSERT"))))
     (progn
        (repeat (setq cnt (sslength ss))
           (setq en   (entget (ssname ss (setq cnt (1- cnt))))
                 xscl (abs (cdr (assoc 41 en)))
                 yscl (abs (cdr (assoc 42 en)))
                 zscl (abs (cdr (assoc 43 en)))
                 en   (subst (cons 41 xscl) (assoc 41 en) en)
                 en   (subst (cons 42 yscl) (assoc 42 en) en)
                 en   (subst (cons 43 zscl) (assoc 43 en) en)
                 en   (subst (cons 50 0.0)  (assoc 50 en) en)
           )
           (entmod en)
        )
     )
  )
)

 

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...