Jump to content

Purge Audit Save


skipsophrenic

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...