CAD命令行输入:vlide,打开LISP编辑器,新建一个文件,输入代码:
(alert “hellow world!”)
工具栏点击加载,返回CAD窗口,弹出提示框”hellow world!”
计算一个数的平方:
(defun c:test() (setq a (getint "请输入一个数字:")) (setq b (* a a )) (print b) (princ) )
加载后,CAD命令行输入:test,按照提示进行操作,输入任意一个数字,比如7,按回车,命令行出现49。