; For This Program To Work Rename This File From *.TXT To *.LSP ;| MakeSmall.lsp Version Date 4-2007 Reducing large autocad files down to a more proper size. The problem is the "Named Layer Filters" a list of filters name in your layer dialog box. I tired the program on a file that was 3,540KB now the same files has been purged down to 120KB. That is 96% smaller! Works with acad (Maybe 2000) and 2002 and up. --> to run this lisp program At the Auto cad command line type appload and then pick the file makesmall.lsp from the list and press enter. This program will auto-run. Now Your Done! |; (defun c:KillProxy ( / *error* ss i n proxy) (vl-load-com) (defun *error* (error) (vla-endundomark *doc*)(cond ((not error))((wcmatch (strcase error) "*QUIT*,*CANCEL*")) (1 (princ (strcat "\nERROR: " error))) ) ) (or *acad* (setq *acad* (vlax-get-acad-object))) (or *doc* (setq *doc* (vla-get-ActiveDocument *acad*))) (vla-endundomark *doc*) (vla-startundomark *doc*) (or (and (setq i 0 n 0) (setq ss (ssget "X" '((0 . "*PROXY*")))) (while (< i (sslength ss)) (setq proxy (vlax-ename->vla-object (ssname ss i))) (and (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-delete (list proxy)) ) ) (setq n (1+ n)) ) (setq i (1+ i)) ) (princ (strcat "\nDeleted " (itoa n) " proxy objects.")) ) (princ "\nNo proxy objects found.") ) (*error* nil) ) ; ;--> Written by: ? (defun C:LayerFiltersDelete (/ dict count) (vl-Load-Com)(vl-Catch-All-Apply '(lambda ()(setq dict (vla-GetExtensionDictionary (vla-Get-Layers (vla-Get-ActiveDocument (vlax-Get-Acad-Object))))) (setq count (vla-Get-Count (vla-Item dict "ACAD_LAYERFILTERS"))))) (cond (count (vl-Catch-All-Apply 'vla-Remove (list dict "ACAD_LAYERFILTERS"))(princ (strcat "\n" (itoa count)" layer filters have been deleted."))) ((princ "\nNo layer filters were found.")))(princ)) ; ;--> Written by: R. Robert Bell ; Auto Run ; Look For acad 14 (if ( = (getvar "acadver") "14.0" ) (prompt "\n ************************************* ") ) (if ( = (getvar "acadver") "14.0" ) (prompt "\n * This Will Not Work In AutoCad 14 * ") ) (if ( = (getvar "acadver") "14.0" ) (prompt "\n ************************************* ") ) (prompt "\n .. ") (prompt "\n kill Proxy Written by: ? " ) (prompt "\n .. ") (prompt "\n Layer Filters Delete Written by: R. Robert Bell ") (prompt "\n From Website --> http://discussion.autodesk.com/thread.jspa?threadID=419212 ") (prompt "\n .. ") (C:killproxy) (C:LayerFiltersDelete) (prompt "\n .. ") (command "purge" "LA" "" "N" )(command "purge" "BL" "" "N" ) (command "purge" "LA" "" "N" )(command "purge" "BL" "" "N" ) (command "purge" "LA" "" "N" )(command "purge" "BL" "" "N" ) (prompt "\n .. ") (textscr) ; flip screen over (prompt "\n Now You Can Save Your Smaller Drawing File ") (prompt "\n Large acad files must stop, so help use all ") (prompt "\n Give this file to all you know who use acad ")