PDA

View Full Version : Purge Audit Save



skipsophrenic
9th Mar 2009, 01:35 pm
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 (http://www.cadtutor.net/forum/showthread.php?t=8463&highlight=Purge+Audit+Save) 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

David Bethel
9th Mar 2009, 02:12 pm
This should work on anything newer than R14. -David



(defun c:pas ()
(command "_.ZOOM" "_C" "" "")
(while (> (getvar "DBMOD") 0)
(command "_.QSAVE"
"_.PURGE" "_All" "*" "_No"))
(command "_.AUDIT" "_Yes")
(command "_.QSAVE")
(prin1))
Make sure you have backups 'cause there is no turning back after you run it. -David

skipsophrenic
9th Mar 2009, 02:14 pm
cheers m8, that did it :thumbsup: