Results 1 to 7 of 7

Thread: Rotate Text

Threaded View

  1. #1
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Hartford, Michigan
    Posts
    3,086

    Default Rotate Text

    I am trying to write a routine that will change the justification of text from middle-left/middle-right to middle center, rotate it 180 degrees and change the justification to the opposite of what it was before.

    This is what I have so far, I cant figure out how to select the rotation point as the insertion of the text, that is where I keep getting errors, any help would be appreciated.

    Code:
    (defun c:tre ()
      (vl-load-com)
      (setq	ss	(ssget (list (cons 0 "TEXT,attdef,MTEXT")))
    	counter	0
      );end of setq
      (repeat (sslength ss)
        (setq Ent (ssname ss 0))
        (setq tempObj (vlax-ename->vla-object Ent)
    	  jp (vla-get-alignment tempObj)
        );end of setq
        (command "_.justifytext" ss "" "mc")
        (setq ins (vla-get-textalignmentpoint tempObj))
        (command "rotate" ss "" ins pi)
        (if	(= jp "middleleft")
          (setq na "mr")
          (setq na "ml")
        );end of if
        (vla-put-alignment ss na)
        (setq counter (1+ counter))
      );end of repeat
      (princ)
      (setq ss nil)
      (reset)
      (princ)
    );end of defun
    Last edited by ccowgill; 2005-11-28 at 10:10 PM. Reason: Mike Please move this to AutoLisp, I was in the wrong forum

Similar Threads

  1. Text Spreads Out on Rotate
    By Ohnoto in forum AutoCAD Fields
    Replies: 4
    Last Post: 2010-06-16, 01:45 PM
  2. Rotate Text
    By mjohns18 in forum AutoCAD General
    Replies: 6
    Last Post: 2009-02-26, 06:59 PM
  3. Rotate text
    By PeterJ in forum DWF Viewer - General
    Replies: 2
    Last Post: 2005-09-21, 05:38 PM
  4. How To: Rotate Text
    By Steve_Stafford in forum Revit Architecture - Tips & Tricks
    Replies: 1
    Last Post: 2005-06-15, 03:55 AM
  5. rotate text
    By windowsxp5 in forum AutoLISP
    Replies: 3
    Last Post: 2005-03-08, 03:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •