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)
)
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)
)