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


Reply With Quote
I explode MTEXT. 