|
It is not an uncommon problem for AutoCAD users to find unselectable or phantom elements in their drawings.
An effective remedy to this issue are the following steps:
1. select all
2. erase
3. "oops"
...then the unselectable element become selectable, and you get on with your day.
We have received a set of drawings where these phantom elements crop up quite regularly.
I want to make a lisp, and then a button, to run the commands listed above.
I can't quite get it to work right. This is what I've done:
(defun c:fixphantoms ()
(command "_ai_selall")
(command "_.erase")
(command "oops")
)
(princ)
)
If I run this is leaves me at a position where I am prompted to select objects (which I don't want).
If I go: Cntrl+A, then press delete, then type "oops", it's all over and my phantoms are fixed.
Can someone please advise how I can change the lisp code so that the three commands get executed and I'm not at a prompt to 'select objects'.
Thanks |
|