添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hi all,

A 10min Google search has not been able to provide me with a satisfactory explanation of what the purpose of the CMDECHO variable is for.

From AutoCAD help:

CMDECHO

Controls whether prompts and input are echoed during the AutoLISP command function.

Can anyone elaborate on this? Perhaps I am having a brain fart moment, and everything I could possibly need to know about CMDECHO is simply already there!

This variable will allow (CMDECHO = 1) or prevent (CMDECHO = 0) display of commands prompts on AutoCAD text window.

It is used in AutoLISP routines to don’t annoy user with a cascade of strings on command prompt. See examples below:

(defun c:Test1() (setvar "CMDECHO" 1) (repeat 11 (command "_LINE" '(0 0) '(1 2) '(7 4) "") (command "_CIRCLE" '(0 0) 5.0) (princ) (setvar "CMDECHO" 1) (command "_LINE" ‘(0 0) ‘(1 2) ‘(7 4) "") (command "_CIRCLE" ‘(0 0) 5.0) (princ) (defun Test1() (setvar "CMDECHO" 0) (command "_LINE" ‘(0 0) ‘(1 2) ‘(7 4) "") (command "_CIRCLE" ‘(0 0) 5.0) (princ)

Regards,

Excellent. Thank you.

This is similar to using "filedia" in a script, no?

You're welcome!

No, FILEDIA isn't similar with CMDECHO ; it with will suppress usage of dialog box for some commands and interrogate user on command prompt instead. This way you will be able to provide information to that command by code, without user interaction.

Regards,

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.