重新输入Lisp
当我运行一个包含以下行的rouitine时,我得到了上面的消息:(setq ip(car (reverse lx)))
(setq pr(polar ip devx 400))
(command "_line" "_non" ip "_non" pr "")
(setq x(getpoint "\nGive nearest point to ip on curve"))
(setq del(abs b))
(setq a(/ del 2))
devx的值已由之前的例程计算。
这发生在画完线之后。有什么问题吗?。hovever,例行程序继续评估renainder,并按预期做我需要做的事情。此外,在我最终接受x在线路上的位置之前,我如何在表格中显示变量值,如最小半径、超高、螺旋长度等。所有这些都是为x的变量位置计算的(根据当地标准)?。
如有任何帮助,我将不胜感激。 在所示示例中,似乎没有什么指向重新输入lisp错误。。。
如果要确保(命令)功能已退出,请在(命令“\u行”\u非“ip”\u非“pr”之后插入此行
(while (> (getvar 'cmdactive) 0) (command ""))
你好,Marko_redar,
谢谢你的回复。然而,它不起作用。用lx和devx的指定值自己尝试一下,如下所示:
(setq lx '((500 500)))
(setq devx 1.0)
(setq b 1)
(setq ip(car (reverse lx)))
(setq pr(polar ip devx 400))
(command "_line" "_non" ip "_non" pr "")
(while (> (getvar 'cmdactive) 0) (command ""))
(setq x(getpoint "\nGive nearest point to ip on curve"))
(setq del(abs b))
(setq a(/ del 2))
您需要设置适当的限制(例如0,0和1000900) 您必须将代码放入定义为命令或非命令的函数中-我的示例是命令函数X
(defun c:x nil
(setq lx '((500 500)))
(setq devx 1.0)
(setq b 1)
(setq ip(car (reverse lx)))
(setq pr(polar ip devx 400))
(command "_line" "_non" ip "_non" pr)
(while (> (getvar 'cmdactive) 0) (command ""))
(setq x (getpoint "\nGive nearest point to ip on curve"))
(setq del (abs b))
(setq a (/ del 2))
)
现在,粘贴代码或用appload加载它,然后键入X执行。。。没有错误消息。。。 谢谢marko,它很管用。
现在我希望它在我的代码中工作,而不必键入x。
当做 你好,Marko,
再次感谢,它在日常工作中起作用。
当做
页:
[1]