无法重新输入lisp错误
你好我在探索(极)函数,所以我在弧度方案的背景上做了一个循环。问题是,我想输入一个lisp表达式,看看方案上发生了什么,但我得到“无法重新输入lisp错误”
exampel公司
命令:PLR
输入系数:
命令:(*pi 3)
无法重新输入LISP。
(defun C:PLR ()
(setq cen '(20.9463 13.5021 0.0))
(while (setq n (getstring T "\nEnter a factor :"))
(setq n(atof n))
(polar cen n 50)
(command "line" cen (polar cen n 50) "")
(
)
)
)
见附件
谢谢
谢伊
PLR。图纸 (defun C:PLR (/ cen)
(setq cen '(20.9463 13.5021 0.0))
(while (setq n (getangle"\nEnter angle:"))
(command "line" cen (polar cen n 50) "")
)(princ)
)
请同时阅读我的按摩 Samifox。。。。。我尝试了两种代码。。。。在你们上传的文件中,我并没有得到你们所说的错误。
下面的jdiala代码比你的工作正常。。。。
(defun C:PLR (/ cen n)
(setq cen '(20.9463 13.5021 0.0))
(while (setq n (getangle"\nEnter angle:"))
(command "line" cen (polar cen n 50) "")
)(princ)
) 当您要求键入因子时,请尝试键入类似(*pi 2)的表达式 Getangle不接受(*pi 2),所以我尝试了下面给出的代码。。。。。
我没有得到任何错误。。。也可以查看附加图像
当我输入(*pi 2)时,它绘制了红线。。。。。
(defun C:PLR (/ cen n)
(setq cen '(20.9463 13.5021 0.0))
(while (= (setq n (getstring T "\nEnter a factor :")) nil)
(command "line" cen (polar cen (atof n) 50) "")
)
(princ)
)
_$ (setq n (getstring T "\nEnter a factor :"))
"(* pi 1.5)"
_$ (atof n)
0.0
应该在270。。。。
Me认为,在将参数传递给极函数之前,应该先输入因子数,然后构造表达式(*pi n)。 Samifox,请注意,您不能将AutoLISP语句输入GET*family函数的提示;帮助摘录:
那么我是否可以从命令行使用表达式?
</blockquote>
页:
[1]
2