张大锤 发表于 2015-11-29 18:27:18

永不言弃 发表于 2015-11-29 08:15 static/image/common/back.gif
??什么情况

是这样的我对个完全不通在工作中我需要一步更改字体 但是这段命令 不是很方便 更改完不是我想要的字体这段代码 我不会改 它是一个 更改字体和字高的一段 我尝试着更改 但是它毫无变化
这个是 选中文字 会变成standard字体和125的字高我想更改成MSP明朝的字体 125的字高不用变化 能帮助我一下吗?十分感谢
(defun c:tt()
   (setvar "cmdecho" 0)
   (princ "\n惪慖潰洈徾:")                ------- 这个乱字 我记得好像是选择文字 提示什么的
   (setq ss(SSGET'((0 . "text"))))
   (setq n 0)
    (repeat (sslength ss)
   (setq ent(ssname ss n))
   (setq en(entget ent))
   (setq en(subst'( 7 . "standard")(assoc 7 en)en))
   (setq en(subst'(40 . 125)(assoc 40 en)en))
   (setq en(subst'(41 . 1)(assoc 41 en)en))
   (entmod en)
   (setq n(1+ n))
   )
(princ)
)

zdqwy19 发表于 2015-11-29 21:01:10

张大锤 发表于 2015-11-29 18:27 static/image/common/back.gif
是这样的我对个完全不通在工作中我需要一步更改字体 但是这段命令 不是很方便 更改完不是我想要的字体这 ...

(defun c:tt()
    (setvar "cmdecho" 0)
    (princ "\n选择文字:")               
    (setq ss(SSGET'((0 . "text"))))
    (setq n 0)
   (repeat (sslength ss)
      (setq ent(ssname ss n))
      (setq en(entget ent))
      (setq en(subst'( 7 . "MSP明朝")(assoc 7 en)en));CAD中必须有“MSP明朝”的字体
;;;      (setq en(subst'(40 . 125)(assoc 40 en)en))
;;;      (setq en(subst'(41 . 1)(assoc 41 en)en))
      (entmod en)
    (setq n(1+ n))
    )
   (princ)
)

xyp1964 发表于 2015-11-30 03:09:49

本帖最后由 xyp1964 于 2015-11-30 03:11 编辑

;; tt(字高对话框)
(defun c:tt ()
(defun main-pro ()(princ th))
(defun ap1 ()
    (xyp-Dcl-Gettile '("po1"))
    (set_tile "th" (nth (atoi po1) lst1))
)
(xyp-initSet '(th) '(100. "0"))
(setq lst1 '("1.0" "1.5" "2.0" "3.0" "5.0" "10.0" "15.0" "20.0" "25.0" "30.0")
      ilst '(":row{"
               ("th" "文字高度" "real" "10")
               ("po1" "" "poplist" "lst1" "6" "(ap1)")
               "}"
            )
)
(if (= (xyp-Dcl-Init Ilst "【文字高度设置】" t) 1)
    (main-pro)
)
(princ)
)

永不言弃 发表于 2015-11-30 08:06:03

xyp1964 发表于 2015-11-30 03:09 static/image/common/back.gif


EP就是好               

永不言弃 发表于 2015-11-30 08:16:31

zdqwy19 发表于 2015-11-29 21:01 static/image/common/back.gif


可以用的                  

sc邵程 发表于 2015-11-30 15:12:17

来学习下,以防后面有用

张大锤 发表于 2015-11-30 21:14:01

zdqwy19 发表于 2015-11-29 21:01 static/image/common/back.gif


这个我试过 我输入完TT 它还是standard

zdqwy19 发表于 2015-11-30 21:19:00

本帖最后由 zdqwy19 于 2015-11-30 21:44 编辑

张大锤 发表于 2015-11-30 21:14 static/image/common/back.gif
这个我试过 我输入完TT 它还是standard
你的字体文件有‘msp明朝‘的字体没有?

张大锤 发表于 2015-11-30 21:25:41

zdqwy19 发表于 2015-11-30 21:19 static/image/common/back.gif
你的字体文件有‘msp明朝‘的字体没有?

这个我还真没看...明天上班去看看...

永不言弃 发表于 2015-11-30 22:20:50

zdqwy19 发表于 2015-11-30 21:19 static/image/common/back.gif
你的字体文件有‘msp明朝‘的字体没有?

没有,百度一下,下载
页: 1 [2] 3
查看完整版本: 练习对话框出问题,求助修改