对话框里的限制非数字输入,及打打印份数
1,请问怎么控制对话框里限制非正整数字的输入?比如:".1" "0.1""你"
2,-plot命令如何编写打印份数的?
目前是这样做的,这个份数没有系统变量设置吗?
(repeat n
(command "-plot" ……
abs(getint) 本帖最后由 啵浪鼓 于 2016-1-22 11:42 编辑
aihuyujian 发表于 2016-1-21 17:44 http://bbs.mjtd.com/static/image/common/back.gif
abs(getint)
这段代码具体怎么写的呢?
好像只能对话框结束后才会有提示吧? 如果能像plot里面的提示那就强大了,好像这个不是DCL能做到的吧? (defun chkreal (/ tile sym syms asc)
(setq syms $value
asc(ascii syms)
tile $key
)
(if syms
(setq sym (read $value))
(setq sym nil)
)
(if (or (not sym) (not (numberp sym)) (= asc 45))
(progn
(vlr-beep-reaction)
(cond
((= tile "gaodu")
(set_tile "comments" "工字钢的高度必须为正的实数!")
)
((= tile "kuandu")
(set_tile "comments" "工字钢的腿宽必须为正的实数!")
)
((= tile "houdu")
(set_tile "comments" "工字钢的腰厚必须为正的实数!")
)
((= tile "nyh")
(set_tile "comments" "内圆弧半径必须为正的实数!")
)
((= tile "bdyh")
(set_tile "comments" "腿端圆弧半径必须为正的实数!")
)
)
(setq err nil)
(mode_tile tile 2)
(setq syms $value
asc(ascii syms)
sym(read $value)
)
)
(setq err t)
)
)
.........
(action_tile "ckuandu" "(chkreal)......") chg 发表于 2016-1-22 12:39 static/image/common/back.gif
(defun chkreal (/ tile sym syms asc)
(setq syms $value
asc(ascii syms)
非常好,非常感谢chg大大!
有点缺憾就是不支持".5"在前,和负数"-.5" "-2.5" 这样的数值,如果输入这些数值CAD直接假死只能强退咯
页:
[1]