;;auto_ch_style.lsp (defun c:auto_ch_style() (setvar "cmdecho" 0) (command "undo" "g") (setq st_list nil) (while (setq st_list (tblnext "STYLE" (null st_list))) (setq st_name (cdr (assoc 2 st_list))) (setq sz_name (cdr (assoc 3 st_list))) (setq hz_name (cdr (assoc 4 st_list))) ;;(if (or (= hz_name "")(null (findfile hz_name))(null (findfile sz_name))) (command "style" st_name "romans.shx,@@_hztxt.shx" "0" "0.75" "0" "n" "n" "n") ;;)去掉分号--无字体文件时替代。保留分号--强制替代。 ) (command "regen") (command "undo" "e") (princ) ) (c:auto_ch_style) 楼上试试这个 将"romans.shx,@@_hztxt.shx"改成你常用的字体 将(load "auto_ch_style.lsp")写入ACAD.mnl,则开图即完成替代 |