Author Topic: Button Macro Fails for OVERKILL. Why?  (Read 467 times)

0 Members and 1 Guest are viewing this topic.

chilldaddy

  • Guest
Button Macro Fails for OVERKILL. Why?
« on: April 03, 2024, 01:10:35 PM »
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

  • Guest
Re: Button Macro Fails for OVERKILL. Why?
« Reply #1 on: April 03, 2024, 01:29:49 PM »
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

  • Administrator
  • Seagull
  • Posts: 10648
Re: Button Macro Fails for OVERKILL. Why?
« Reply #2 on: April 03, 2024, 02:12:32 PM »
Since this post is in the AutoLisp forum, might as well get some lisp for similar functionality.

Code: [Select]
(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))

Which is a small lisp that does the same as your macro (and looks like this):
Code - Auto/Visual Lisp: [Select]
  1.   (mapcar
  2.     '(lambda (x) (repeat 2 (eval x)))
  3.     '(
  4.       (command "_.purge" "a" "" "n")
  5.       (command "_.audit" "y")
  6.       (command "_.purge" "a" "" "n")
  7.       )
  8.     )
  9.   (command "_.qsave")
  10.   (princ)
  11.   )
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2140
  • class keyThumper<T>:ILazy<T>
Re: Button Macro Fails for OVERKILL. Why?
« Reply #3 on: April 03, 2024, 04:55:03 PM »
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: [Select]
^C^C-OVERKILL;all;;;_zoom;e;-purge;a;;n;audit;y;-purge;a;;n;qsave
« Last Edit: April 03, 2024, 04:58:43 PM by kdub_nz »
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

tombu

  • Bull Frog
  • Posts: 289
  • ByLayer=>Not0
Re: Button Macro Fails for OVERKILL. Why?
« Reply #4 on: April 16, 2024, 01:43:43 PM »
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.
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D