Jump to content
rcb007

UnMirror - Rotate to 0

Recommended Posts

rcb007

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.

Share this post


Link to post
Share on other sites
tombu

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

Share this post


Link to post
Share on other sites
pkenewell

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

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...