Why are my Acad2000 dwg files so big when they have so little in them?

Discussion in 'AutoCAD' started by Notlih, Oct 16, 2005.

  1. Notlih

    Notlih Guest

    My office uses ACAD2000. (kinda old but works for our purposes.)

    I have noticed that some drawing files are very large for their
    content. One example is a drawing with 8 lines which has 3 layers, no
    blocks, and its size is about 3 megabytes.

    The drawing is totally purged.

    I'm looking for any recommendations. Are there any utilities out
    there that can clean up hidden garbage?

    Unfortunately my CAD team can't be taught good drawing hygeine.

    Thanks in advance.
     
    Notlih, Oct 16, 2005
    #1
  2. Notlih

    Mr. B Guest

    Try purging the DWG files of Layer Filters. Create the following Layer Filter
    LSP file (LFD.lsp), load and run it. Then Save the file and compare it with
    the origina (BAK) file. If that works, then I'd suggest that you set up to
    run the LFD.lsp file automatically each time you open any file. This way it
    will Purge the drawing of Layer Filters all the time.

    ps... whatch out for word wrap in the Lisp file cut/paste info that I've
    included

    Regards,

    BruceF


    ;;; by Phil L
    ;;; this layerfilter killer doesn't use vla for the vlax handicapped
    ;;; type in lfd and it will remove all layerfilters
    ;;; only way I know to get the table object, "layer", where the filter object
    ;;; pointer resides, is to get layer '0' and go to its owner since
    ;;; layer 0 always exists.
    ;;; Checks layer object for xdict, looks for a layerfilter object.
    ;;; if found deletes the layerfilter object entity.
    ;;; makes sure there are no more. (Which shouldn't be)
    ;;; also makes multi runs thru each xdict to be sure only one layerfilter
    ;;; I don't know if more than layerfilter object is allowed but
    ;;; this kills ALL of them
    ;;; added: kills acad_layerstates also, I don't know what this is but I
    ;;; don't need or want them. If you need these edit the code indicated
    ;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;
    (defun LFcount ( l / c)
    (setq c 0)
    (foreach x l
    (if (= 3 (car x))(setq c (1+ c))))
    c
    )
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;
    (defun killdict (l s / el c )
    (setq c 0)
    (if (/= (car l) 360)
    (progn (alert "dxf structure problem")(exit))) ; dxf 360 is
    pointer to dict item
    (while (setq el (dictsearch (cdr l) s))
    (setq c (+ c (LFcount el)))
    (entdel (cdr (assoc -1 el))))
    c
    )
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;; go thru list and return sublist starting with key data = s or nil
    ;;; (getsublist '((1 2)(3 4)(5 6)) '(4))==> ((3 4)(5 6))
    ;;;
    (defun getsublist (l s )
    (if (or (not l) (= (cdar l) s))
    l
    (getsublist (cdr l) s ))
    )
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    ; *** START ***
    (defun C:LFD ( / LT found found1 ) ; kill all layerfilters
    (setq LT (entget (cdr (assoc 330 (entget (tblobjname "layer" "0")))))
    found 0
    found1 0)
    ;; look for all acad_xdictionary
    ;; then look for all layerfilter entries

    ;; do for all layer table entity/object
    (while (setq LT (getsublist LT "{ACAD_XDICTIONARY" ))
    (setq found (+ found (killdict (cadr LT) "ACAD_LAYERFILTERS"))

    ;;remove following line if layerstates are wanted
    ;;;*;;; found1 (+ found1 (killdict (cadr LT) "ACAD_LAYERSTATES"))

    LT (cddr LT)))

    ;;;*;;; (princ (strcat "\nLAYERFILTERS/LAYERSTATES found and killed: " (itoa
    found) "/" (itoa found1)))
    (princ (strcat "\nLAYERFILTERS found and deleted: " (itoa found)))

    (princ)
    )
    ;;; by Phil L
     
    Mr. B, Oct 16, 2005
    #2
  3. Notlih

    Notlih Guest

    Thank you both. SuperPurge, alas was no help. My 8 line drawing is
    still at 2.7 meg.
     
    Notlih, Oct 16, 2005
    #3
  4. Notlih

    Mr. B Guest

    One thought came to mine. If you have some blocks which are lots of JUNK in
    them, you might want to try to clean them up (and redefine them) and see if
    that makes a difference. That is one reason why you can't purge some stuff
    because they are part of a block.
    That is something you should deal with. In my humble opinion (having been
    drafting manually/CAD for over 30 years)... SLOPPY drafting is NOT excusable.
    And if a 'draftperson' doesn't understand the necessisty of clean CAD work,
    they read them the riot act.

    My 2-Bits worth.

    Regards,

    BruceF
     
    Mr. B, Oct 17, 2005
    #4
  5. Notlih

    Dude0000007 Guest

    Dude0000007, Oct 19, 2005
    #5
  6. Notlih

    dmtaurus Guest

    When drawings become huge compared to their content I use the "wblock"
    command, save what the monitor screen shows, and create a new drawing
    file. This has always brought huge files dowm to size. The command is
    in 2000.
     
    dmtaurus, Oct 21, 2005
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.