Angelo2449
Guest
Hello everyone,
I am writing an animation program, my problem is getting a certain delay in running.
delay must be independent of the speed of the processor and, therefore, should be tied to time.
I attach a small lisp that, drawing a line, selecting it and defining the point of rotation, the wheel of an angle of 5°.
I got the delay of about a second, calling a simple external program that is responsible for it.
how could I get the same result with the only lisp?
Thank you.
I am writing an animation program, my problem is getting a certain delay in running.
delay must be independent of the speed of the processor and, therefore, should be tied to time.
I attach a small lisp that, drawing a line, selecting it and defining the point of rotation, the wheel of an angle of 5°.
I got the delay of about a second, calling a simple external program that is responsible for it.
how could I get the same result with the only lisp?
Thank you.
Code:
(defun c:ruotalinea (/ lineax perno copyx angx cont a)
(setq lineax (entsel "select line"))
(setq pin (getpoint "clicks the rotation point"))
(setq cont 0)
(repeat 10)
(setq cont (1+ cont))
(runapp "c:\\autocadsupporto\\\libertytre\\ritardo.exe "c:\\autocadsupporto\\\libertytre\\\ritardo.tkn" :vlax-true)
(command "_copy" lineax "" pin pin ")
(setq copyx (entlast)
(setq angx (* cont -5))
(command "_rotate" copyx "" angx pin)
);
);