skipsophrenic Posted March 9, 2009 Share Posted March 9, 2009 Hi all, The macro that was on my machine at work is a bit "buggy" so I was hoping to write a lisp to do the same thing, I've used ASMI's code from THIS post as a starting guide, but could someone just run over my code and tell me if there are any problems they spot pls. ;;;(Purge->Audit->Save) (defun c:pas () (vl-load-com) (repeat 3 (vla-PurgeAll (vla-get-ActiveDocument (vlax-get-acad-object) ) ) ) ; end repeat (command "_.qsave") (command "_.Audit" "y" "") (princ) ) ; end of c:pas Quote Link to comment Share on other sites More sharing options...
David Bethel Posted March 9, 2009 Share Posted March 9, 2009 This should work on anything newer than R14. -David [b][color=BLACK]([/color][/b]defun c:pas [b][color=FUCHSIA]([/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]command [color=#2f4f4f]"_.ZOOM"[/color] [color=#2f4f4f]"_C"[/color] [color=#2f4f4f]""[/color] [color=#2f4f4f]""[/color][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]while [b][color=NAVY]([/color][/b]> [b][color=MAROON]([/color][/b]getvar [color=#2f4f4f]"DBMOD"[/color][b][color=MAROON])[/color][/b] 0[b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]command [color=#2f4f4f]"_.QSAVE"[/color] [color=#2f4f4f]"_.PURGE"[/color] [color=#2f4f4f]"_All"[/color] [color=#2f4f4f]"*"[/color] [color=#2f4f4f]"_No"[/color][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]command [color=#2f4f4f]"_.AUDIT"[/color] [color=#2f4f4f]"_Yes"[/color][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]command [color=#2f4f4f]"_.QSAVE"[/color][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]prin1[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] Make sure you have backups 'cause there is no turning back after you run it. -David Quote Link to comment Share on other sites More sharing options...
skipsophrenic Posted March 9, 2009 Author Share Posted March 9, 2009 cheers m8, that did it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.