Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reduce file size 1

Status
Not open for further replies.

borgunit

Programmer
Mar 25, 2002
373
0
0
US
This is a great tip to reduce file size.

A little known "bloat" setting is saved in AutoCAD with each drawing. It is the layer filter settings. With the following little routine, the layer filters are removed. If you use this a lot, you can leave them, but most people only use this once in a blue moon. I hope this helps. (Just check file size before and after to see the results).

;------------------------------------------------------------------------------
;LayerFiltersDelete
;------------------------------------------------------------------------------
(defun LayerFiltersDelete ()
(vl-catch-all-apply
'(lambda ()
(vla-remove
(vla-getextensiondictionary
(vla-get-layers
(vla-get-activedocument
(vlax-get-acad-object)
)
)
)
"ACAD_LAYERFILTERS"
)
)
)
(princ)
)

 
I forgot to say that the line

(vl-load-com)

will need to be added if you do not have it in the lisp routine already.
 
Hey thanks for the great tip and routine - stars to you

Todd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top