本帖最后由 作者 于 2009-4-16 15:26:47 编辑
;;;得到所有TextStyle Name ;;;从网上得到 (defun GetAllTextStyleNames (/ names) (or Gb:AcO (setq Gb:AcO (vlax-get-acad-object))) (or Gb:AcD (setq Gb:AcD (vla-get-ActiveDocument Gb:AcO))) (vlax-for Sty (vla-get-TextStyles Gb:AcD) (setq names (cons (vla-get-Name Sty) names)) ) names ) ;;判断一个style的font是否找得到
;;对windos字体不完善 (defun IsTextStyleFontOk (sty / f3 f4 ) (and (setq f4 (tblsearch "style" sty)) (or (findfile (setq f3 (cdrassoc 3 f4))) (findfile (strcat f3 ".shx")) (findfile (strcat "C:\\WINDOWS\\Fonts\\" f3)) (and (= f3 "SimSun.ttf") (findfile "c:/windows/fonts/simsun.ttc") ) ) (or (null (setq f4 (cdrassoc 4 f4))) (= "" f4) (findfile f4) (findfile (strcat f4 ".shx")) ) ) ) |