参考网友程序进行修改而成 (defun c:chtxsy ( / a b1 b2 e f index n ns zt) (setvar "cmdecho" 0) (command "purge" "a" "*" "n") (setq A (ssget "x" '((0 . "TEXT,MTEXT")))) (if (tblsearch "style" "XIAOLIN") (princ) (command "-style" "XIAOLIN" "txt.shx,hztxt.shx" "" "0.7" "" "" "" "") ) (setvar "dimtxsty" "standard") (princ "正在处理中.....\n") (setq ns "XIAOLIN") (setq n (sslength a)) (setq index 0) (repeat n (setq b1 (entget(ssname a index))) (setq index (+ index 1)) (setq e (assoc 7 b1)) (setq f (cons (car e) ns)) (setq b2 (subst f e b1)) (entmod b2) ) (command "-style" "hztxt" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "chian" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "dim_font" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "1" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "ht" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "hz" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "romand" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "standard" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "yy" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "ro" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "style1" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "-黑体" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "simplex" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "h1" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "youyuan" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "hz" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "kt64f" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "lushu" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "kaiti" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "meihei" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "songti" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "zongyi" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "宋体" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "_simplex" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "att" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "dim" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "黑体" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "楷体" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "幼圆" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "华文" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "style2" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "style3" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "华文中宋" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "2" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "3" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "text" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "text1" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "text2" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "dim" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "dim1" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "dim2" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "_ht64f" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "_hzls" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "_txt" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "1" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "2" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "3" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "4" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "5" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "6" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "ht" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "_hzdx" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "_cibt____" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "comb" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "middle" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "_fds" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "_romanc" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "cg" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "fs1" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "_fs1" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "std" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "_fsj" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "fs" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "st" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "LP1" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "ROMANT" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "lp2" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "_HZTXT" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "_COMPLEX" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "-style" "complex" "txt.shx,hztxt.shx" "" "" "" "" "" "") (command "purge" "a" "*" "n") (princ "\n 字体转换成功!") (setvar "cmdecho" 1) (princ ) ) ;以方便各位解决字体问题。 |