Alex_Miller Posted November 24, 2018 Posted November 24, 2018 I want to get the amount of objects. (setq amount (sslength (ssget))) or (setq amount (getint "\nAmount of details: ")) to choose from at the same time. Does it possible? Quote
Lee Mac Posted November 24, 2018 Posted November 24, 2018 Not as a single prompt (at least not without recreating your own version of ssget using a grread loop). I would instead suggest something like this: (defun c:test ( / qty tmp ) (initget 6) (if (setq qty (cond ( (getint "\nNumber of details <select>: ")) ( (setq tmp (ssget)) (sslength tmp) ) ) ) (progn (princ (strcat "\nThe user specified " (itoa qty) " object" (if (= 1 qty) "." "s."))) ;; do something else ) ) (princ) ) 1 Quote
Alex_Miller Posted November 24, 2018 Author Posted November 24, 2018 Lee Mac It's a variant too, just extra press. Thank you. 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.