hunszab Posted September 7, 2010 Posted September 7, 2010 Hi! How can I suspend the execution for a_time seconds/ or milliseconds? Like in C : sleep 1000 --the program sleeps 1 sec Thanks any help! Quote
Lee Mac Posted September 7, 2010 Posted September 7, 2010 (defun delay1 ( msec ) (command "_.delay" msec) ) is probably the least CPU intensive, else something like: (defun delay2 ( msec ) ( (lambda ( start ) (while (< (- (getvar 'MILLISECS) start) msec)) ) (getvar 'MILLISECS) ) ) Quote
hunszab Posted September 7, 2010 Author Posted September 7, 2010 Thanks again the fast answer Lee! Quote
David Bethel Posted September 7, 2010 Posted September 7, 2010 (defun delay (d / cd);;;DELAY 1e-6 = 1 Second (setq cd (getvar "CDATE")) (while (> (+ cd d) (getvar "CDATE")))) More of a kludge. -David Quote
hunszab Posted September 7, 2010 Author Posted September 7, 2010 Hi! I have another question: How can I force AUTOCAD, to draw everything immediately. Let me clear: If I make a loop: i.e. 100 times want to draw blocks, then Autocad will draw a group of blocks (10-20) and not each block. So Autocad will draw 5-10 times 10-20 blocks, and not 100 times 1 block. I'd like to draw each block immediately. Thanks any help! Quote
David Bethel Posted September 7, 2010 Posted September 7, 2010 If speed is the problem, (entmake) is a lot faster than a (command). As to making multiple entities is a single operation, Autocad is not up to the task. There are MINSERTs which can be useful. They can only be used a rectangular arrays. -David Quote
hunszab Posted September 7, 2010 Author Posted September 7, 2010 Thanks a lot! Another problem: How can I run parallel process in autolisp? I hope it's capable of it! Quote
David Bethel Posted September 7, 2010 Posted September 7, 2010 If you mean multitasking, then the short answer is 'No'. -David Quote
hunszab Posted September 8, 2010 Author Posted September 8, 2010 Yep, that was what I wanted to know. Thanks Quote
hunszab Posted September 9, 2010 Author Posted September 9, 2010 Hi! This problem belongs not really here, but I write it here: I'd like to divide a LWPOLYLINE into points, they are a specific distance from each other. So: I have to watch only the dxf code 10- which is the point coordinate and the 42 which is the buldge... If the polyline phase is line then ok, that case is ok, but what can I do when the polzline next two points are a buldge. I hope you understood me. So I want a function like this: (defun makepoly (polyline distance) ;;; returns the list of points, which are in the polyline and from a distance of each other. ) ;when I mean distance, that means the distance ON the BULGE. thanks any help! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.