Bogbadbob658 Posted October 26, 2012 Posted October 26, 2012 Is it possible to rotate an object to thecurrent UCS. I use UCS object quite a bit and want to align text to the mycurrent UCS without having to align it to an object. i.e. to select the text andsimply rotate it around the justify point to a set angle relative to the current view. Hopethat makes sense. Quote
MSasu Posted October 26, 2012 Posted October 26, 2012 Something like this? ;;; Rotate Text to Current UCS routine (26-X-2012) (defun c:RTCU( / ssetText assocText ) (prompt "\nSelect text entity to match with current UCS rotation (plan only):") (if (setq ssetText (ssget "_:S" '((0 . "TEXT")))) (entmod (setq assocText (entget (ssname ssetText 0)) assocText (subst (cons '50 (atan (cadr (getvar "UCSXDIR")) (car (getvar "UCSXDIR")))) (assoc 50 assocText) assocText))) ) (princ) ) Quote
Bogbadbob658 Posted October 26, 2012 Author Posted October 26, 2012 Thank you. Exactly like that. Quote
MSasu Posted October 26, 2012 Posted October 26, 2012 Glad to hear that. The code must be adusted for non planar (XoY) labels. Quote
Recommended Posts
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.