salman Posted July 5, 2010 Posted July 5, 2010 Hi all, ssget function displays "select objects: " prompt. I am writing a lisp which prompts user to select blocks in the drawing. For this I am using (ssget ":s" (list(con 0 "INSERT"))). Before calling the ssget I display "Select Block: " prompt. But when the function invokes it displays its own message also, which I do not want to display. Can we disable this default prompt message of ssget. Thanks Quote
Lee Mac Posted July 5, 2010 Posted July 5, 2010 Store the setting of NOMUTT Sys Var, set it to 1, princ a message, call ssget, return the value of NOMUTT. (setq old (getvar 'NOMUTT)) (setvar 'NOMUTT 1) (princ "\nSelect a Block: ") (ssget "_+.:E:S" '((0 . "INSERT"))) (setvar 'NOMUTT old) Quote
alanjt Posted July 5, 2010 Posted July 5, 2010 I've used the following a couple times However, I'm not a huge fan of altering the NoMutt variable, since you can't see any additional selection prompts. eg. Command: (ssget) Select objects: k *Invalid selection* Expects a point or Window/Last/Crossing/BOX/ALL/Fence/WPolygon/CPolygon/Group/Add/Remove/Multiple/P revious/Undo/AUto/SIngle (defun AT:SSGet (msg meth flt / *error* ss) ;; SSGet Replacement, with prompt ;; msg - Display message ;; meth - Selection method (ie: "_X", "_:L"), nil if not ;; flt - Selection filter, nil if not ;; Alan J. Thompson, 10.31.09 (setq *error* (lambda (x) (setvar 'nomutt 0))) (prompt (cond (msg) ("\nSelect objects: ") ) ) (setvar 'nomutt 1) (if meth (setq ss (ssget meth flt)) (setq ss (ssget flt)) ) (*error* nil) ss ) Be sure to pay attention to Lee's selection usage for ssget single selection. 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.