Author Topic: Prevent SSGET from printing the "Select objects" text  (Read 3634 times)

0 Members and 1 Guest are viewing this topic.

iliekater

  • Guest
Prevent SSGET from printing the "Select objects" text
« on: January 10, 2007, 12:44:16 PM »
I usually use the
( getvar "CMDECHO" 0 )
statement so that the AutoCAD's messages should not appear in the command line . However , the above code does not prevent Lisp from printing texts too . This usually happens when I use the
ssget
function and I get the "Select objects" messages in the command line . You may say : "So what ? Afterall , this is what ssget does ." . Well , that's right , but I want to have total control on the command line prompts becouse , actually , I want to print texts on various languages , not only in english .

Jeff_M

  • King Gator
  • Posts: 4100
  • C3D user & customizer
Re: Prevent SSGET from printing the "Select objects" text
« Reply #1 on: January 10, 2007, 12:49:36 PM »
I thought the Select Objects: prompt was country specific, in other words the language should change based on the Autocad country version.....does it not?

As far as I know, there is no way (in lisp or VBA) to suppress that prompt without also suppressing anything you may want to include. This may be possible in ObjectArx, but that's beyond my expertise.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Prevent SSGET from printing the "Select objects" text
« Reply #2 on: January 10, 2007, 12:55:31 PM »
Change the system variable 'nomutt' to 1, but make sure you change it back.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

iliekater

  • Guest
Re: Prevent SSGET from printing the "Select objects" text
« Reply #3 on: January 10, 2007, 01:46:44 PM »
Ooooooh ! !
Me gusta me gusta  :lol:  :lol:  :lol:  :lol:

iliekater

  • Guest
Re: Prevent SSGET from printing the "Select objects" text
« Reply #4 on: January 10, 2007, 01:54:54 PM »
Well , that's funny ... Now I am also getting rid of some of my own texts !  :realmad: ... I tried substituting the PRINC function with the PRINT , but still the same .
Well , I quess this is what they call it "You get some you lose some" ... :cry:

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Prevent SSGET from printing the "Select objects" text
« Reply #5 on: January 10, 2007, 01:57:39 PM »
Then do it just for the ssget
Code: [Select]
(progn
 (prompt "\n Select text objects: ")
 (setvar "nomutt" 1)
 (setq ss (ssget))
 (setvar "nomutt" 0)
 (prompt "\n End!")
 (princ)
)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Jeff_M

  • King Gator
  • Posts: 4100
  • C3D user & customizer
Re: Prevent SSGET from printing the "Select objects" text
« Reply #6 on: January 10, 2007, 02:15:25 PM »
But you will get no intermediate prompts if the user needs to keep adding objects.........this is why I didn't suggest NOMUTT. While it appears to do what is needed, it usually makes things worse...especially if no Error handler is used to reset it when the user cancels the command....

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Prevent SSGET from printing the "Select objects" text
« Reply #7 on: January 10, 2007, 02:43:22 PM »
Yes, and what if the user hits Escape.
There should be "No Prompt" option for ssget.

Code: [Select]
(defun *error*()  (setvar "nomutt" 0) )

(progn
 (prompt "\n Select text objects, Enter when done: ")
 (setvar "nomutt" 1)
 (setq ss (ssget))
 (setvar "nomutt" 0)
 (princ)
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

iliekater

  • Guest
Re: Prevent SSGET from printing the "Select objects" text
« Reply #8 on: January 10, 2007, 03:13:39 PM »
Oh , thanks for the replies , guys . Don't worry , I only used the NOMUTT as long as ssget runs  :-)
Ofcourse , I also added an error function in case the user abandons the command .

Jeff_M said :
Quote
But you will get no intermediate prompts if the user needs to keep adding objects........

Well , I don't thing there is a problem . I simply printed a text before SSGET starts , saying something like "Please select objects to ... bla bla bla" . And tell yo what : I like it more like that becouse the text remains in the command line (in the language the user choosed to) .
And , don't worry , in a few days you will find out what I am up to !