1、新建一个HZTXT字体样式:(command "STYLE" "HZTXT" "isocp,hztxt" "" "0.75" "" "" "" ) ;HZTXT样式 2、然后把选择所有字: (setq ss_text (ssget "X" (list (cons -4 "<or") (cons 0 "TEXT") (cons 0 "MTEXT") (cons 0 "ATTDEF") (cons -4 "or>") ))) 3、更改为这个样式。 (if ss_text (ss_entmod ss_text (list (cons 7 "HZTXT") (cons 41 0.75) ) ) );if ;函数ss_entmod (defun ss_entmod(ss_ssget tylst / en ed new old ) (while (> (sslength ss_ssget) 0) (setq en (ssname ss_ssget 0)) (setq ed (entget en)) (foreach new tylst (if (setq old (assoc (car new) ed)) (setq ed (subst new old ed)) (setq ed (append ed (list new))) ) ;if ) ;foreach (entmod ed) (ssdel en ss_ssget) ) ;while ) ;defun |