maahee Posted 2 hours ago Posted 2 hours 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
maahee Posted 1 hour ago Author Posted 1 hour ago (edited) @mhupp Case 1: I want to reduce the time. I use the "not (ssmemb n ss)" function, but it takes a long time when the selection set is large. case 2: Press the Enter key once to continue the loop, and press it twice to exit. ( empty selection set handle) The above two cases do not relate to each other. Please Edited 1 hour ago by maahee Quote
mhupp Posted 6 minutes ago Posted 6 minutes ago I understand what your asking for in case1 case2. I am asking is why your using them. might be a better optimization in how your selecting things. just asking for a higher level of what your trying to do. 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.