I'm looking for a quick lisp to rotate selected text at various angles back to 0 degrees. -- Windows 2000 SP4 LDD 2004 SP2 Joe Smetanko R.D. Zande & Associates, Inc. 1500 Lake Shore Drive Columbus, Ohio 43204
Thanks -- Windows 2000 SP4 LDD 2004 SP2 Joe Smetanko R.D. Zande & Associates, Inc. 1500 Lake Shore Drive Columbus, Ohio 43204
(defun c:r0 (/ ctext el tang1) (setq ctext (car (entsel "\nSelect text to rotate..."))) (setq EL (entget ctext)) (while (AND (/= (cdr (assoc 0 el)) "MTEXT")(/= (cdr (assoc 0 el)) "TEXT")) (setq ctext (car (entsel "\nSelect text to rotate..."))) (while (= ctext nil) (setq ctext (car (entsel "\nSelect text to rotate..."))) ) (setq EL (entget ctext)) ) (SETQ tang1 0) (setq el (subst (cons 50 tang1) (assoc 50 EL) EL )) (if (= (cdr (assoc 90 EL)) 2) (setq el (vl-remove (assoc 90 EL) EL)) ) (entmod el) (princ) )
Exactly what I needed - thanks -- Windows 2000 SP4 LDD 2004 SP2 Joe Smetanko R.D. Zande & Associates, Inc. 1500 Lake Shore Drive Columbus, Ohio 43204
Or you can try my code ; mrt is stand for making rotation of text ; Design by Ade Suharna <> ; 13 October 2004 ; program no. 114/10/2004 ; edit by (defun dtr (a) (* pi (/ a 180.0))) (defun rtd (a) (* 180.0 (/ a pi))) (defun c:mrt (/ ent info50 opt ed) (while (setq ent (entget (car (entsel "\nCLICK TEXT FOR ROTATION:"))) info50 (strcat (rtos (rtd (cdr (assoc 50 ent))))(chr 432)) opt (dtr (getreal (strcat "\nENTER NEW VALUE FOR rotation<" info50 ">: "))) ed (subst (cons 50 opt)(assoc 50 ent) ent)) (entmod ed) ) (princ) )