半听可乐 发表于 2013-12-7 22:38 
万分感谢你和“1993063”这位朋友,你们的程序都完全满足我的需求,你的这个更灵活些,惊喜!
小改,调整为全局函数版(所谓的记忆功能) - (defun c:ty(/ ss en e txth1 dr1)
- (prompt "\n请选择需要统一直径与字高的圆、文字:")
- (if (setq ss(ssget '((0 . "*text,circle"))))
- (progn
- (or dr (setq dr 150))
- (or txth (setq txth 300))
- (or (and (setq dr1(getreal(strcat "\n输入统一圆的直径值<"(if dr (rtos dr 2 2) "150")">:")))(setq dr dr1)))
- (or (and (setq txth1(getreal(strcat "\n输入统一的文字高度值<"(if txth (rtos txth 2 2) "300")">:")))(setq txth txth1)))
- (while (setq en(ssname ss 0))
- (setq e(entget en))
- (cond
- ((wcmatch (cdr(assoc 0 e)) "*TEXT" )(entmod (subst (cons 40 txth) (assoc 40 e) e)))
- ((wcmatch (cdr(assoc 0 e)) "CIRCLE" )(entmod (subst (cons 40 (* dr 0.5)) (assoc 40 e) e)))
- )
- (setq ss(ssdel en ss))
- )
- )
- (princ "\n Noting !!!")
- )
- (princ)
- )
|