CAD修改文字的字体程序

时间:2026-01-15

修改文字的字体

(defun *error*(st)

(princ (strcat "Error: " st))

(princ)

)

(defun C:chst(/ test ss len n en1 a oldr newr ent nn)

(setvar "CMDECHO" 0)

(setq test T nn 0)

(while test

(setq ss (ssadd))

(setq ss (ssget))

(if (= nil ss)

(setq test nil)

(progn

(setq len (sslength ss))

(setq n 1 s 1)

(while (<= n len)

(setq en1 (ssname ss (1- n)))

(setq a (entget en1))

(if (= "TEXT" (cdr (assoc 0 a)))

(progn

(if (= s 1)

(progn

(setq oldr (cdr (assoc 7 a)))

(setq newr (strcase (getstring (strcat "\nNew font <" oldr ">:")))) (if (= newr "") (setq newr oldr))

(setq s nil)

)

)

(if (= (tblsearch "style" newr) nil)

(progn

(cond ((= newr "XW")

(command "STYLE" "xw" "txt" "0" ".8" "0" "n" "n" "n")) ((= newr "HZ")

(command "STYLE" "hz" "txt,hztxt" "0" ".8" "0" "n" "n" "n")) ((= newr "CHINA")

(command "STYLE" "china" "txt,china" "0" ".8" "0" "n" "n" "n")) ((= newr "LM")

(command "STYLE" "lm" "complex" "0" ".8" "0" "n" "n" "n")) (T (princ (strcat "\nPlease define style " newr " use STYLE command !")))

)

)

)

(setq ent (subst (cons 7 newr) (assoc 7 a) a)) (entmod ent)

(setq nn (1+ nn))

)

)

(setq n (1+ n))

)

)

)

)

(princ (strcat (itoa nn) " changed !"))

(princ)

)

CAD修改文字的字体程序.doc 将本文的Word文档下载到电脑

    精彩图片

    热门精选

    大家正在看

    × 游客快捷下载通道(下载后可以自由复制和排版)

    限时特价:4.9 元/份 原价:20元

    支付方式:

    开通VIP包月会员 特价:19元/月

    注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
    微信:fanwen365 QQ:370150219