AutoCAD 2016 LISP Issue

AutoCAD 2016 LISP Issue

Anonymous
Not applicable
1,206 Views
2 Replies
Message 1 of 3

AutoCAD 2016 LISP Issue

Anonymous
Not applicable

Hi everyone.  Super new to the LISP routines so here is my problem.  We have a standard routine here at work to clean drawings before they go out to our clients.  So far I have this:

 

(defun C:TestRun ()
    (command "purge" "r" "*" "N" "")
    (command "-purge" "r" "*" "N" "")
    (command "overkill" "all" "")
    (command "audit" "y" "")
    (command "-scalelistedit" "d" "")
    (princ))

 

My issue is that I receive a prompt when it hits the overkill part, which I would like to automate. There is also the issue with the "-scalelistedit" where the command runs but at the end of the LISP I remain in the options part of the "-scalelistedit" command. 

 

We are using AutoCAD 2016. 

 

Any help I could get with this issue would be greatly appreciated. Thanks

0 Likes
Accepted solutions (1)
1,207 Views
2 Replies
Replies (2)
Message 2 of 3

SeeMSixty7
Advisor
Advisor
Accepted solution
instead of running the normal version of overkill. use the -overkill command, that way you don't get the dialog box. You will also need to finish the command by providing whatever options you need to provide to overkill and then one more "" to complete the command

(command "-overkill" "ALL" "" "");This just accepts the settings and says done.

Same things for the scalelistedit command
(command "-scalelistedit" "d" "" "E") ; The E tells it you are done.

I'm sure you will discover some better ways to do this, but my hope is that you see better how the command function works and learn to apply it to your new lisp skills.

Good luck,
Message 3 of 3

Anonymous
Not applicable
Awesome! Thank you very much for your help. It worked great.
0 Likes