;;;旋转文字(defun c:xzwz(/ x k s n m en r)
(vl-load-com)
(setq x(getangle"\n输入需要旋转的角度<归0>:"))
(if(null x)(setq x 0 k nil) (setq k t))
(setq s(ssget'((0 . "text,mtext"))))
(if s
(progn
(setq n(sslength s)m 0)
(while(< m n)
(setq en(ssname s m)
m(1+ m))
(if k(setq r (+ (cdr(assoc 50 (entget en))) x))(setq r x))
(vla-put-Rotation (vlax-ename->vla-object en) r)
)))
(princ)
)