Code Red > AutoLISP (Vanilla / Visual)

Button Macro Fails for OVERKILL. Why?

(1/1)

chilldaddy:
Testing a button macro code to invoke the  OVERKILL command including the selection option as ALL entities, the process stalls when the dialog box appears.

PROBLEM: The attempted macro code stalls after entity selection.
The dialog box appears and the ACCEPT button must depressed before it continues.

CODE: C^C^_OVERKILL;ALL;;APPLY;

QUESTION: What is the needed in the above code to complete processing?

Thanks,
Clint

chilldaddy:
I found this super button macro code that WORKS and DOES MUCH MORE than Overkill!

^C^C-OVERKILL;all;;;_zoom;e;-purge;a;;n;audit;y;-purge;a;;n;qsave

JohnK:
Since this post is in the AutoLisp forum, might as well get some lisp for similar functionality.


--- Code: ---(progn (command) (command) (vl-load-com) (vla-zoomextents (vlax-get-acad-object)) (mapcar '(lambda (x) (repeat 2 (eval x))) '( (command "_.purge" "a" "" "n") (command "_.audit" "y") (command "_.purge" "a" "" "n") )) (command "_.qsave") (princ))

--- End code ---

Which is a small lisp that does the same as your macro (and looks like this):

--- Code - Auto/Visual Lisp: ---(progn  (command) (command)  (vl-load-com)  (vla-zoomextents (vlax-get-acad-object))  (mapcar     '(lambda (x) (repeat 2 (eval x)))    '(      (command "_.purge" "a" "" "n")       (command "_.audit" "y")      (command "_.purge" "a" "" "n")       )    )  (command "_.qsave")  (princ)  )

kdub_nz:
To members:
Please keep in mind that some of us use a dark background, and blue on black is a pain.

for generic code, simply use a code tag:

--- Code: ---^C^C-OVERKILL;all;;;_zoom;e;-purge;a;;n;audit;y;-purge;a;;n;qsave

--- End code ---

tombu:
Keep in mind there are a ton of settings for the OVERKILL command that affect outcome and could cause it to fail normally set in it's dialog box but can be set in lisp as well.

Navigation

[0] Message Index

Go to full version