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

Ending a foreach loop

2 REPLIES 2
Reply
Message 1 of 3
southie
1399 Views, 2 Replies

Ending a foreach loop

Hi Gang

 

(defun stopx ()
(setql ww nil)
)

(setq ww  '("3AF4" "3AF7" "3AFA" "3AFD" "3B00" "3B03" "3B06" "3B09" "3B0C"))

 

Can one stop a (foreach  n ww .......

loop that calls a dialog box and user chooses cancel in the middle of loop (action_tile "cancel" "(stopx)(done_dialog)")

 

does not seem to be workin.

 

Thanks

Southie

2 REPLIES 2
Message 2 of 3
dgorsman
in reply to: southie

No.  Switch to (while...) so you can add conditional testing.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 3 of 3
southie
in reply to: dgorsman

Thanks dgorsman & nice to see you helping again!

 

Southie

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

Post to forums  

Autodesk Design & Make Report

”Boost