Working in AutoCAD™ 2012... Is there a way to "erase" an entity, line, etc. by selecting it and having it immediately disappear? I work in 3D/DXB files a lot and it really helpful when working with an audience either for on-screen seminars or over-the-shoulder. Huge Help Thank you. DCN
When I erase something, its gone right away. You could reverse your process: select the objects, then call the ERASE command. An example might provide more insight to your needs.
I imagine that the OP wants to start an "erase" sequence so that objects disappear as they are clicked. At least for me, the selected item is not erased until <enter> and multiple objects are erased as a group, not at the moment they are clicked.
GrantsPirate
Piping and Mech. Designer
Always save a copy of the drawing before trying anything suggested here.
----------------------------------------------------------------------------
If something I wrote can be interpreted two ways, and one of the ways makes you sad or angry, I meant the other one.
Macro ^C^C_E"SI"
Then when you want to use it, type E then pick object. Object is gone. If you need it again immediately, then right click, then pick another item and it will be erased immediately.
A line in acaddoc.lsp would look like this.
(DEFUN C:EE () (SETVAR "CMDECHO" 0)(COMMAND ".ERASE" PAUSE "")(PRIN1))
You wouldn't need the SI option but it could be used.
(DEFUN C:EE () (SETVAR "CMDECHO" 0)(COMMAND ".ERASE" "SI")(PRIN1))
Type EE(use any letter or letters that aren't already used), enter, pick.
GrantsPirate
Piping and Mech. Designer
Always save a copy of the drawing before trying anything suggested here.
----------------------------------------------------------------------------
If something I wrote can be interpreted two ways, and one of the ways makes you sad or angry, I meant the other one.
My two cents.
Macro,
will repeat the erase command, option single, until you press Esc
*^C^C_.Erase;SI;
AutoLISP,
will delete entities with a single click, until you press Enter, spacebar, or pick none...
(defun c:MyErase (/ s) (while (setq ss (ssget "_+.:S:L")) (entdel (ssname ss 0)) );; while (princ) );; MyErase
change the "MyErase" to the one that most suits you.
HTH
Henrique
Henrique,
in re: *^C^C_.Erase;SI;
I tried the asterix at the beginning. I changed it in the CUI and edited the tool palette macro. It works from the tool palettes but not from my keyboard shortcut. I thought it would work universally from the CUI? It does not. I get a normal ERASE action when I type in my command alias. Any ideas?
@steve216586 wrote:
Henrique,
in re: *^C^C_.Erase;SI;
I tried the asterix at the beginning. I changed it in the CUI and edited the tool palette macro. It works from the tool palettes but not from my keyboard shortcut. I thought it would work universally from the CUI? It does not. I get a normal ERASE action when I type in my command alias. Any ideas?
Steve,
changing only the macro, in CUI, the command name remains ERASE (the native command, we have not redefine it), but if we create a new Command, i.e. MyErase, with that macro, and then edit the keyboard shortcut to the new command, will work.
Henrique
Thanks!