yunfengning 发表于 2013-8-11 10:07:52

大侠们帮忙,以前申请的字符程序,现在好不用了

(defun C:3x ()
(if (> (strlen (setq s1 (getstring "\nInput string 输入字符串 :"))) 0) (progn
(if (wcmatch s1 "*.*") (setq s1 (chchar s1 "." "q")))
(if (wcmatch s1 "*.*") (setq s1 (chchar s1 "." "q")))
(if (wcmatch s1 "*q*") (setq s1 (chchar s1 "q" "}")))
(if (wcmatch s1 "*q*") (setq s1 (chchar s1 "q" "}")))
(if (wcmatch s1 "*-*") (setq s1 (chchar s1 "-" ";")))
(if (and (setq s2 (entsel "\nSelect a text选择文字 :"))
         (setq ent (entget(car s2)))
         (= (cdr (assoc 0 ent)) "TExT")) (progn
   (setq ent (subst (cons 1 s1) (assoc 1 ent) ent))
   (entmod ent)
))
))
(princ)
)
(defun chchar (ss eqq wt / tmp i)
(setq i 1 tmp "")
(while (/= (setq s2 (substr ss i 1)) eqq) (setq tmp (strcat tmp s2) i (1+ i)))
(strcat tmp wt (substr s1 (1+ i)))
)

yunfengning 发表于 2013-8-11 12:25:03

其功能是
考虑到输入的方便,键盘输入的“.”在CAD里实际显示为“}”
页: [1]
查看完整版本: 大侠们帮忙,以前申请的字符程序,现在好不用了