求助大神 把万新改成JR
(defun c:zdbh (/ oce1 qz n1 zn h1 sxh1 p1) ;自动编号(setq oce1 (getvar "cmdecho"))
(setvar "cmdecho" 0)
;(command "-style" "BG_ST" "宋体" 0 0.8 0 "n" "n")
(c:zt)
(c:zg)
;(setq qz (getstring "\n请输入前缀相同的部分: "))
;(if (not (setq n1 (getint "\n请输入起始顺序号 <1>: ")))
(setq n1 1)
(setq qz "")
;)
;(if (not (setq zn (getint "\n请输入增加或减少的序数 <+1>: ")))
(setq zn 1)
;)
;(if (not (setq h1 (getreal "\n请指定文字高度 <2.5>: ")))
;(setq h1 2.5)
;)
(setq h1 zigao)
(setq
sxh1 (strcat qz (itoa n1))
p1 (getpoint "\n请指定点: ")
)
(while (/= p1 nil)
(command "text" "m" p1 h1 0 sxh1)
(setq
n1 (+ n1 zn)
sxh1 (strcat qz (itoa n1))
p1 (getpoint "\n请指定下一点: ")
)
)
(setvar "cmdecho" oce1)
(princ)
)
(defun c:zdbh (/ oce1 qz n1 zn h1 sxh1 p1) ;自动编号
(setq oce1 (getvar "cmdecho"))
(setvar "cmdecho" 0)
;(command "-style" "BG_ST" "宋体" 0 0.8 0 "n" "n")
(c:zt)
(c:zg)
;(setq qz (getstring "\n请输入前缀相同的部分: "))
;(if (not (setq n1 (getint "\n请输入起始顺序号 <1>: ")))
(setq n1 1)
(setq qz "万新")
;)
;(if (not (setq zn (getint "\n请输入增加或减少的序数 <+1>: ")))
(setq zn 1)
;)
;(if (not (setq h1 (getreal "\n请指定文字高度 <2.5>: ")))
;(setq h1 2.5)
;)
(setq h1 zigao)
(setq
sxh1 (strcat qz (itoa n1))
p1 (getpoint "\n请指定点: ")
)
(while (/= p1 nil)
(command "text" "m" p1 h1 0 sxh1)
(setq
n1 (+ n1 zn)
sxh1 (strcat qz (itoa n1))
p1 (getpoint "\n请指定下一点: ")
)
)
(setvar "cmdecho" oce1)
(princ)
) 本帖最后由 czb203 于 2023-6-24 22:40 编辑
(defun c:tt (/ oce1 qz n1 zn h1 sxh1 p1) ;自动编号
(setq oce1 (getvar "cmdecho"))
(setvar "cmdecho" 0)
(setq n1 1)
(setq qz "JR")
(setq zn 1)
(setq h1 2.5)
(setq
sxh1 (strcat qz (itoa n1))
p1 (getpoint "\n请指定点: ")
)
(while (/= p1 nil)
(command "text" "j" "mc" p1 h1 0 sxh1)
(setq
n1 (+ n1 zn)
sxh1 (strcat qz (itoa n1))
p1 (getpoint "\n请指定下一点: ")
)
)
(setvar "cmdecho" oce1)
(princ)
)
飞雪神光 发表于 2023-6-24 17:47
大神,是不是把代码里的万新改成JR就可以了
页:
[1]