Jump to content

Recommended Posts

Posted

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!

Posted

(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)
 )
)

Posted


(defun delay (d / cd);;;DELAY 1e-6 = 1 Second
 (setq cd (getvar "CDATE"))
 (while (> (+ cd d)
           (getvar "CDATE"))))

 

More of a kludge. -David

Posted

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!

Posted

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

Posted

Thanks a lot!

 

Another problem:

How can I run parallel process in autolisp?

I hope it's capable of it!

Posted

If you mean multitasking, then the short answer is 'No'. -David

Posted

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!

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...