Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Timed Pause

6 REPLIES 6
Reply
Message 1 of 7
safcadd08
524 Views, 6 Replies

Timed Pause

Hello,

How do I pause for a certain length of time 5 seconds or 10 seconds.

 

Thanks,

Steve

6 REPLIES 6
Message 2 of 7
Ian_Bryant
in reply to: safcadd08

Hi, try

(defun wait (secs / target)
  (setq target (+ (/ secs 24.0 60.0 60.0) (getvar "date")))
  (while (< (getvar "date") target))
  T
)

 

e.g.

(wait 10) pauses for 10 secs

Ian

Message 3 of 7
devitg
in reply to: Ian_Bryant

As clear as water. Thanks
Message 4 of 7
Kent1Cooper
in reply to: safcadd08


@safcadd08 wrote:

....

How do I pause for a certain length of time 5 seconds or 10 seconds.

....


(command "_.delay" 5000)

or

(command "_.delay" 10000)

Kent Cooper, AIA
Message 5 of 7
safcadd08
in reply to: Kent1Cooper

Hi Kent, Forgot to tell you the commands have to lisp and not vlisp... Thanks, Steve
Message 6 of 7
devitg
in reply to: safcadd08

On Peters´s behalf

 

(command "_.delay" 10000)

 

 

is just pure and simple LISP ,

 

 

not a VLISP´s  BITE

Message 7 of 7
Kent1Cooper
in reply to: safcadd08


@safcadd08 wrote:
.... Forgot to tell you the commands have to lisp and not vlisp....

As devitg said, they are ordinary AutoLISP.  For an example of how they might be used, paste this into your Command: line:

 

(command "_.line" (getvar 'viewctr) (polar (getvar 'viewctr) 0 (getvar 'viewsize)) "" "_.delay" 5000 "_.rotate" "_last" "" (getvar 'viewctr) "90")

 

and hit Enter.  No matter what your drawing units or zoom level, it should draw a Line from mid-screen off to the right, and 5 seconds later, rotate it so it goes upward.

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost