I have a macro to toggle UCSDETECT system variable on and off.
(if (= (getvar "ucsdetect") 0)(setvar "ucsdetect" 1)(setvar "ucsdetect" 0))
When I press the button that has the macro assigned into it, what I see on the command line is:
Command:
Command:
Command: (if (= (getvar "ucsdetect") 0)(setvar "ucsdetect" 1)(setvar "ucsdetect" 0)) 1
I would like it to be so, that it only says UCSDETECT ->0 or ->1 in the command line, depending on what was the case.
How could I achieve this?
I tried to play with (setvar "CMDECHO" 0) but was unable to make it work as I wanted.
Solved! Go to Solution.
Solved by cadffm. Go to Solution.
Solved by vinodkl. Go to Solution.
Solved by cadffm. Go to Solution.
May i ask why you need that button and [F6] isn't good enough - incl. the information about ON or OFF,
also the UCSDETECT button in your statusbar, what displays the ON/OFF state too.
Sebastian
I agree with @cadffm. There is already a shortcut key "F6" to turn on/off dynamic UCS. There is also another keyboard shortcut "ctrl+D" to turn on/off dynamic UCS. But if you are not used to keyboard shortcuts then you can copy the macro code from the CUI and create a new command and use that🙂
Thanks, didn't remember there is a built-in shortcut for it.
Nevertheless, if there is someone who has information on how to alter the things that are shown on command line when executing a macro, I would much appreciate it. I bet I will come up with a function that doesn't have a built-in shortcut and my ocd kicks in if the command line shows this and that instead of what I want it to show.
This is near by your tried way: Edit the red part
^P(terpri)(princ (strcat "UCSDETECT -> " (itoa(setvar 'UCSDETECT (- 1 (getvar 'UCSDETECT))))))(princ)
If you really need "your own print out",
you have to start with programming and create your own userdefined commands.
This way you can hide and print out whatever you want (ok, 99.9%)
You have one or more folders with you CAD Standard, Tools and so on
You set up your AutoCAD/Profil to load the files&tools you need (search4 ss:startup autoload acaddoc.lsp or Appload Start Suite)
one of your codes is
(defun c:USELESSUCSDETECTtoggle nil
(princ(strcat "\nUCSDETECT -> " (itoa(setvar 'UCSDETECT (- 1 (getvar 'UCSDETECT))))))
(princ)
)
and your button macro is just:
'USELESSUCSDETECTtoggle
Sebastian
Can't find what you're looking for? Ask the community or share your knowledge.