hide text that appears in the command window

hide text that appears in the command window

carlos_m_gil_p
Advocate Advocate
3,189 Views
14 Replies
Message 1 of 15

hide text that appears in the command window

carlos_m_gil_p
Advocate
Advocate

Hello boys how are you.
Can someone tell me how I can hide text that appears in the command window.

 

(defun c:xxx  (/)
  ;;
  (setvar "cmdecho" 0)
  ;;
  (command "-scalelistedit" "_r" "_y" "_e")
  ;;
  (command "_.-purge" "_a" "" "_n" "_.-purge" "_r" "" "n")
  (command "_.-purge" "_r" "" "n")
  ;;
  (setvar "cmdecho" 1)
  ;;
  (princ)
  ;;
  )

 

I attached an image so you can understand me.

Thank you very much.

 

txt-hide.png

 


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes
Accepted solutions (1)
3,190 Views
14 Replies
Replies (14)
Message 2 of 15

cadffm
Consultant
Consultant

Try the handling with cmdecho

Sebastian

0 Likes
Message 3 of 15

carlos_m_gil_p
Advocate
Advocate

Hello how are you.
Thanks for your help.
I had already implemented it, as you can see in the code.


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes
Message 4 of 15

Kent1Cooper
Consultant
Consultant
Accepted solution

This question goes  > > w a y b a c k < < .  That's just one example -- put "Suppress Purge Command Echoing" into the Search window for some other threads on the same topic, and one the same about PEDIT.  Unfortunately, it doesn't seem there's any way to suppress echoing of certain elements of certain commands.

Kent Cooper, AIA
0 Likes
Message 5 of 15

cadffm
Consultant
Consultant
OMG, i am sorry it was written in hurry.

embarrassing

Sebastian

0 Likes
Message 6 of 15

jlojeda
Explorer
Explorer

(GRAPHSCR)

0 Likes
Message 7 of 15

carlos_m_gil_p
Advocate
Advocate

Hello how are you.
Thanks to everyone, I did not know that this text could not be hidden.
Thank you.


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes
Message 8 of 15

jlojeda
Explorer
Explorer

Dear, write (GRAPHSCR) at the end of the code of your peogram, with this it will show the editor of autocad and therefore it will hide the text screen.

0 Likes
Message 9 of 15

carlos_m_gil_p
Advocate
Advocate

Hi, jlojeda, how are you?
I do not need to hide the window.
I need to hide the text. (the echo)
Excuse my English, I only speak Spanish


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes
Message 10 of 15

jlojeda
Explorer
Explorer

A ok, sorry si por si ya lo escribieron más arriba pero, probaste con (setvar "cmdecho" 0) al inicio del programa?

0 Likes
Message 11 of 15

carlos_m_gil_p
Advocate
Advocate

Hola, no sabias que hablabas español.

Si ya lo probe, por eso coloque el codigo al principio para descartar esas opciones.

Pero solo pasa con algunos comandos.

Mil gracias por tu ayuda.


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes
Message 12 of 15

jlojeda
Explorer
Explorer

A sí perdón, puedes usar esto para el purge, al menos es más silencioso:

(vla-PurgeAll (vla-get-activedocument (vlax-get-acad-object)))

 

 

0 Likes
Message 13 of 15

carlos_m_gil_p
Advocate
Advocate

Si lo intente, pero no es tan bueno como el otro.

Por ejemplo:

Cuando hay lineas con longitud cero, no las purga.

Por eso prefiero quedarme con el método que estoy utilizando. Jejeje.


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes
Message 14 of 15

jlojeda
Explorer
Explorer

Para borrar las lineas de longitud = 0:

 

(setq sel (ssget "X" (list (cons 0 "LINE"))))
(if sel
(progn
(setq n 0)
(repeat (sslength sel)
(setq ename (ssname sel n))
(setq startpoint (cdr (assoc 10 (cdr (entget ename)))))
(setq endpoint (cdr (assoc 11 (cdr (entget ename)))))
(setq dist (distance startpoint endpoint))
(if (= dist 0.0)(entdel ename))
(setq n (1+ n))
)
)
(princ)
)

Message 15 of 15

carlos_m_gil_p
Advocate
Advocate

Hola hermano, gracias por esa solución.

Es mas código pero valida.

Un saludo.


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes