29meg drawing = 250kb???

Discussion in 'AutoCAD' started by R. Hamm, Jan 27, 2006.

  1. R. Hamm

    R. Hamm Guest

    I have a drawing that is 29 meg, I can do "erase" "all", remove
    "crossing", then purge, audit, fix, all layers are on, thawed,
    unlocked, exit, it stays 29 meg. It is a simple 2D drawing.
    the fix:
    I copy entities with base point, paste into new drawing and it becomes
    250k.
    What is hidden in this larger drawing?
    Thanks,
    R. Hamm
     
    R. Hamm, Jan 27, 2006
    #1
  2. R. Hamm

    R.K. McSwain Guest

    R. Hamm said the following on 1/27/2006 11:51 AM:
    A ton of Named layer filters?
     
    R.K. McSwain, Jan 27, 2006
    #2
  3. R. Hamm

    Mr. B Guest

    As RK suggested... probably a Ton of Layer Filters. I received a drawing the
    other day with 23000 of them!!! The drawing went from 2.5Mb to 450k after I
    got rid of them.

    Try this LISP file (LFD):

    (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 found and removed: " (itoa found)))
    (princ)
    ) ;lfd
     
    Mr. B, Jan 27, 2006
    #3
  4. R. Hamm

    R. Hamm Guest

    That seemed to be the problem although that lisp routine bombed out, I
    found a different one on the web that had a DCL with it, problem with
    that is if I selected too many it would get an error, so I had to
    select about a 100 layers at a time and delete them, this would take
    about 10 times thru the routine, any ideas why it cannot handle all
    layers at once?
    Thanks
     
    R. Hamm, Jan 28, 2006
    #4
  5. R. Hamm

    R.K. McSwain Guest

    What version of AutoCAD are you using, and what version is this drawing?
     
    R.K. McSwain, Jan 29, 2006
    #5
  6. R. Hamm

    R. Hamm Guest

    both are version 2000, also, anyone know how hundreds and thousands of
    layer filters get in these drawings? I don't even use them so I am not
    creating them.
    Thanks.
     
    R. Hamm, Jan 30, 2006
    #6
  7. R. Hamm

    Mr. B Guest

    Hmmm.... I used my routine for 2002 to 2005. I think you said you have 2000.
    So maybe that is why it didn't work :(
    Not without seeing the Lisp Code.

    Regards,

    BruceF
     
    Mr. B, Jan 30, 2006
    #7
  8. R. Hamm

    Mr. B Guest

    I can only suspect that they get added several ways.

    1) Someone actually uses them and create them
    2) Files with the filters get reused for other projects (even though the
    filter is not required)
    3) Inserting Blocks add to the list if the Blocks have filters (I'm guessing
    on this. But if this is true, then it is probably the largest contributor to
    adding Filter to drawings).

    .... there maybe others.

    Regards,

    BruceF
     
    Mr. B, Jan 30, 2006
    #8
  9. R. Hamm

    Jeff Guest

    Here's one the works in R2000-R2002


    (defun c:LFD (/ dicts dict)
    (vl-Load-Com)
    (vl-Catch-All-Apply
    '(lambda ()
    (setq dicts (vla-GetExtensionDictionary
    (vla-Get-Layers
    (vla-Get-ActiveDocument
    (vlax-Get-Acad-Object)
    )
    )
    )
    )
    (setq dict (vla-item dicts "ACAD_LAYERFILTERS"))
    (vlax-for filtr dict
    (vla-delete filtr)
    )
    )
    )
    (princ "\nAll layer filters have been deleted.")
    (princ)
    )

    Jeff
     
    Jeff, Jan 31, 2006
    #9
  10. It's quite amusing that AutoDesk beat all virus programmers and did the
    first ".dwg" virus by itself.

    This is quite bad, it:
    - spreads efficiently
    - slows down or even jams your AutoCAD
    - eats harddisk space, slows down drawing file handling/transfer
    - very hard to get rid of, Norton Antivirus etc. wont help

    On top of that if it could destroy data, it would be perfect.
    This is quite a new approach from AutoDesk: "Do the virus yourself before
    hackers get around to it".
     
    Harri Yli-Harju, Jan 31, 2006
    #10
  11. R. Hamm

    Ian A. White Guest

    And they keep introducing new ones!

    The latest with 2006 is if you enter what was the old DTEXT and happen
    to turn on underscore or overscore with %%U or %%O, but fail to turn
    it off and don't want to enter any more lines, you have to enter
    twice. The new "feature" is that you don't have to turn it on for the
    next line, only if it is the blank like to end the command, you end up
    with a text object that contains just %%U or %%O. If you were using a
    SHX style, you get left with a dot. If you were using a TTF style,
    nothing displays but the text object is still there with just %%U or
    %%O.

    So now there is another contender. But then this is nothing new.
    Remember the zero length polylines (polylines with just one vertex)?
    Well contrary claims that it was a third party developer that used
    them to hold data, it was nothing other than good old AutoCAD that
    created them when a closed polyline was trimmed in a particular
    direction.

    --

    Regards,

    Ian A. White, CPEng.

    | /| / WAI Engineering
    | /_| / Sydney 2000
    |/ |/ Australia

    www.wai.com.au

    mailto:

    callto://waiwhite on Skype
     
    Ian A. White, Jan 31, 2006
    #11
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.