Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Rotate multiple text objects 180 while retaining individual insertion points?

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
n8ch
7187 Views, 7 Replies

Rotate multiple text objects 180 while retaining individual insertion points?

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?

 

 

7 REPLIES 7
Message 2 of 8
troma
in reply to: n8ch

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

Message 3 of 8
dhenderhan
in reply to: n8ch

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.

Thanks,

David E. Henderhan, PLS
Civil 3D 2023
Dell Precision 3660 - Windows 10 Pro 64-bit
Intel (R) RTX A2000
12th Gen Intel(R) Core(TM) i7-12700 2.10 GHz
128 GB ram
Message 4 of 8
n8ch
in reply to: dhenderhan

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.

Message 5 of 8
prabhakar.sa
in reply to: n8ch

Can you please send me the lisp.

Message 6 of 8
n8ch
in reply to: prabhakar.sa

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

Message 7 of 8
manikumarchappa970
in reply to: n8ch

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

 

Message 8 of 8

It is right there in Message 6.

 

Bill

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report