Short Question: I have numerous text objects I want to rotate 180 while retaining each text objects insertion point. There's got to be an easy way to do this.
Long explanation: I created an annotation template to label pipe diameters on an imported shapefile. Everythings good, labels are parallel with lines, except for the fact that some labels are upside down. Is there an expression that would eliminate this? In my annotation template, my rotation expression equals the "angle" field of the object. My "quick and dirty" fix was to burst the annoation labels, and manually rotate necessary text, which wasn't a huge headache since I'm dealing with a relatively small number of labels, but in the future I might have hundreds of upside down labels.
Any thoughts or suggestions?
Solved! Go to Solution.
Solved by n8ch. Go to Solution.
Look into the "plan readability" of your labels, that should have fixed it.
For the question about text, I suggest you ask in the Lisp forum. Or just search in it. It's probably been done before.
Mark Green
Working on Civil 3D in Canada
Not sure if this will help, but you can also try 'flip label' or 'reverse label' in the menu that comes up in the ribbon when you select the label.
I did a little further research and found a LISP that rotated text accordingly to make it plan readable. I think thats the quickest way to resolve my problem, so I'll take it.
Thanks for the input guys, I was steered onto a LISP that would have come in handy over the years.
TextReadable.LSP
Command is TextReadable
(defun c:Read (/ pi/2 3pi/2 ss i obj ang)
;; make text Readable
;; Required subroutines: AT:BoundingBoxMidPoint
;; Alan J. Thompson, 12.17.11
(if (setq pi/2 (/ pi 2.)
3pi/2 (* pi 1.5)
ss (ssget "_:L" '((0 . "MTEXT,TEXT")))
)
(repeat (setq i (sslength ss))
(if (and (> (setq ang (vla-get-rotation
(setq obj (vlax-ename->vla-object (ssname ss (setq i (1- i)))))
)
)
pi/2
)
(<= ang 3pi/2)
)
(vlax-invoke obj 'Rotate (AT:BoundingBoxMidPoint obj) pi)
)
)
)
(princ)
)
(defun AT:BoundingBoxMidPoint (obj / a b)
;; Return midpoint between boundingbox of specified VLA-OBJECT
;; Alan J. Thompson, 07.13.10
(if (eq (type obj) 'VLA-OBJECT)
(progn
(vla-getboundingbox obj 'a 'b)
(apply (function (lambda (p1 p2) (mapcar (function (lambda (a b) (/ (+ a b) 2.))) p1 p2)))
(mapcar (function vlax-safearray->list) (list a b))
)
)
)
)
Dear denderhan,
Sir Please send me the Lisp File i have urgent work on that type of work . I need
Regards,
Ch Mani Kumar,
manikumarchappa970@gmail.com