RyanGC Posted June 7, 2010 Share Posted June 7, 2010 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! Quote Link to comment Share on other sites More sharing options...
MSasu Posted June 7, 2010 Share Posted June 7, 2010 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) ) vs. (defun c:Test2() (setvar "CMDECHO" 0) (repeat 11 (command "_LINE" '(0 0) '(1 2) '(7 4) "") (command "_CIRCLE" '(0 0) 5.0) ) (princ) ) Regards, 1 Quote Link to comment Share on other sites More sharing options...
RyanGC Posted June 7, 2010 Author Share Posted June 7, 2010 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 Test1() (setvar "CMDECHO" 1) (command "_LINE" ‘(0 0) ‘(1 2) ‘(7 4) "") (command "_CIRCLE" ‘(0 0) 5.0) (princ) ) vs. (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? Quote Link to comment Share on other sites More sharing options...
MSasu Posted June 7, 2010 Share Posted June 7, 2010 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, 1 Quote Link to comment Share on other sites More sharing options...
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.