In shown example nothing seems to point on re-entering lisp error...
If you want to make sure that (command) function has exit insert this line after (command "_line" "_non" ip "_non" pr)
Code:(while (> (getvar 'cmdactive) 0) (command ""))


Registered forum members do not see this ad.
When I run a rouitine containing the following line I get the above message:
The value of devx has been calculaed by the routine previously.Code:(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))
It happens after the line has been drawn. What seems to be the problem?. The routine, hovever,goes on to evaluate the renainder and do what I need to do as intended. Also how can I show the values of variables such as minimum Radius, superelevation, lenght of spiral etc. all calculated for varius positions of x (as per local standards) in a table before I finally accept its position on the line?.
I shall be grateful for any help.
In shown example nothing seems to point on re-entering lisp error...
If you want to make sure that (command) function has exit insert this line after (command "_line" "_non" ip "_non" pr)
Code:(while (> (getvar 'cmdactive) 0) (command ""))


Hi Marko_redar,
Thanks for the reply. It however does not work. Try it yourself with asigned values for lx and devx as follows:
You need to set appropriate limits (say 0,0 and 1000, 900)Code:(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))
You have to put your code inside function defined as command or non-command - my example is command function X
Now, paste code or load it with appload, and type X to execute... There is no error message...Code:(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)) )


Thanks marko it works.
Now I want it to work inside my code without having to type x.
Regards


Registered forum members do not see this ad.
Hi Marko,
Thanks again, it works inside the routine.
Regards
Bookmarks