It looks like you're new here. If you want to get involved, click one of these buttons!
Is there a way to set a timed pause in a LISP routine?
Such as:
(defun c:PAUSE-TEST () ;PAUSE-TEST @ command line launches routine
(Command "-Layer" "Thaw" "1" "") ;Thaw Layer 1
;PAUSE FOR 3 SECONDS
(Command "-Layer" "Freeze" "1" "") ;Freeze Layer 1
;PAUSE FOR 2 SECONDS
(Command "-Layer" "Thaw" "2" "") ;Thaw Layer 2
;PAUSE FOR 3 SECONDS
(Command "-Layer" "Freeze" "2" "") ;Freeze Layer 2
;PAUSE FOR 2 SECONDS
(Command "-Layer" "Thaw" "3" "") ;Thaw Layer 3
;PAUSE FOR 3 SECONDS
(Command "-Layer" "Freeze" "3" "") ;Freeze Layer 3
;PAUSE FOR 2 SECONDS
(Command "-Layer" "Thaw" "4" "") ;Thaw Layer 4
;PAUSE FOR 3 SECONDS
(Command "-Layer" "Freeze" "4" "") ;Freeze Layer 4
;PAUSE FOR 4 SECONDS
(princ "\n\t Thaw 1-4 & Freeze 1-4 Complete") ;Comment @ routine completion
(princ) ;No Nil returned
) ;Ends PAUSE-TEST
The goal is to show 24 different options visually in sequence.
Comments
I think you can use Delay. To pause for 4 seconds:
(command "delay" 4000)
In BricsCAD LISP you can use the
SLEEP
functionRegards,
Jason Bourhill
BricsCAD V20 Ultimate
CAD Concepts
Thank you very much guys.
DELAY worked, couldn't get SLEEP to work.
Odd thing though, it was inconsistant.
Canged routine 1 line @ a time to watch for errors.
Sometimes the 1st time I ran it, it went well.
Other timse it did not work right such as Layer 3 did not thaw.
But I found that if I run it again right after the bad run, it works. Not sure why there is some inconsitancy; does not ellicit confidence.
But will mess w/ it some more.
We shall see how 24 layers work.
(defun c:PAUSE-TEST () ;PAUSE-TEST @ command line launches routine
(Command "-Layer" "Thaw" "1" "") ;Thaw Layer 1
(Command "DELAY" "2000") ;Pause 4 seconds
(Command "-Layer" "Freeze" "1" "") ;Freeze Layer 1
(Command "-Layer" "Thaw" "2" "") ;Thaw Layer 2
(Command "DELAY" "2000") ;Pause 4 seconds
(Command "-Layer" "Freeze" "2" "") ;Freeze Layer 2
(Command "-Layer" "Thaw" "3" "") ;Thaw Layer 3
(Command "DELAY" "2000") ;Pause 4 seconds
(Command "-Layer" "Freeze" "3" "") ;Freeze Layer 3
(Command "-Layer" "Thaw" "4" "") ;Thaw Layer 4
(Command "DELAY" "2000") ;Pause 4 seconds
(Command "-Layer" "Freeze" "4" "") ;Freeze Layer 4
(princ "\n\t Thaw 1-4 DELAY 4 Sec.") ;Comment @ routine completion
(princ) ;No Nil returned
) ;Ends PAUSE-TEST
**Anthony & Jason, **
Awesome; 1st run on all 24 layers failed, locked after layer 3, ESC’d, ran it again, good.
Thanks a lot. Now I have to polish it up for show.
Mike