Jump to content

Recommended Posts

Posted

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

Posted

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)

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...