明经CAD社区's Archiver
社区
›
AutoLISP/Visual LISP 编程技术
› 如何清除错误,让程序继续执行?
tm20038175
发表于 2011-6-22 19:21:13
如何清除错误,让程序继续执行?
(setq str (getstring (strcat "\n<隐藏外所有图层>:\n请输入不隐藏的图层名(Enter)<默认FEM图层>:")))
(if (= str nil) (setq str "FEM"))
这段代码回车就有错误,可以检测错误,清除错误继续执行吗?
236004
发表于 2011-6-22 19:25:07
(if (= str "") (setq str "FEM"))
tm20038175
发表于 2011-6-22 19:30:20
回复 236004 的帖子
果然是的,好办法,哈哈~~~~
页:
[1]
查看完整版本:
如何清除错误,让程序继续执行?