 - (defun c:lxy (/ ss str)
- (if (not str )
- (setq str "(-0.050)")
- )
- (setq str (getstring (strcat "\n请输入文本<" str ">:")))
- (prompt "\n选择文本(支持标注(非天正),单、多行文本):")
- (setq ss (ssget '((0 . "*TEXT,DIMENSION"))))
- (foreach s (lxy-pickset->list ss)
- (if (= (cdr (cadr (entget s))) "DIMENSION")
- (Vlax-Put-Property (Vlax-Ename->Vla-Object s) 'TextOverride str )
- (Vlax-Put-Property (Vlax-Ename->Vla-Object s) 'TextString str )
- )
- (Vlax-Put-Property (Vlax-Ename->Vla-Object s) 'Color 1 )
- )
- )
|