maahee Posted 1 hour ago Posted 1 hour ago ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CASE 1 (setq ss (ssadd)) (if (not (ssmemb n ss)) (ssadd n ss) ;code );if ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CASE 2 (setq flag T) (while flag (setq obj (ssget "_:S")) (cond (obj ;CODE ) ;ar (t (princ "\nNo selection made.") (initget "X") (setq bm (strcase (getstring "\nEnter 'X' to exit or press Enter to continue [X]: " ) ) ) (if (= bm "X" ) (setq flag nil) ; Exit the loop if user types 'x' (princ "\nInvalid input. Please try again.") ) ;if ) ) );WHILE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CASE 1: If the dataset is large, it will slow down the process. alternatives or tricks. CASE 2: Press the Enter key once to continue the loop, and press it twice to exit. or Only the letter "x" and empty inputs are acceptable. 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.