Author Topic: Help to Reduce Extremely Large Drawing File Size  (Read 17611 times)

0 Members and 1 Guest are viewing this topic.

Vince

  • Newt
  • Posts: 55
Help to Reduce Extremely Large Drawing File Size
« on: December 06, 2012, 09:55:33 AM »
Hello Swamp Members,

I have a AutoCAD drawing file received from a consultant that I need to use on a project.  The file size is over 15mb however, from looking at the the drawing it should only be around 1-2mb tops. I deleted all layer filters, purged and audited the drawing but the file size remains around 13mb. I looked into the Purge command options and found blocks that could not be deleted and discovered there were over 2000 block definitions  (*A10, *A100, *A101, etc) in the file that was probably the reason for the large file size.

Apparently these Anonymous Blocks are causing the problem......is there any way to delete/purge them from the drawing....??  I tried to copy and paste the visible objects to another clean drawing files but the "Paste" options fails with an "Invalid" error.  How can I resolve this difficulty....??

Any assistance would be appreciated...!



Regards,
Vince

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: Help to Reduce Extremely Large Drawing File Size
« Reply #1 on: December 06, 2012, 10:06:01 AM »
use _wblock

Vince

  • Newt
  • Posts: 55
Re: Help to Reduce Extremely Large Drawing File Size
« Reply #2 on: December 06, 2012, 10:07:40 AM »
Tried   _Wblock   and that does not remove the Anonymous Blocks...!



Thanks,
Vince

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Help to Reduce Extremely Large Drawing File Size
« Reply #3 on: December 06, 2012, 10:16:00 AM »
The anonymous block definitions may represent Dynamic Block references in the drawing whose dynamic parameters have been altered following insertion.

Although the *A### prefix is usually used for anonymous groups...

hmspe

  • Bull Frog
  • Posts: 362
"Science is the belief in the ignorance of experts." - Richard Feynman

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: Help to Reduce Extremely Large Drawing File Size
« Reply #5 on: December 06, 2012, 10:22:38 AM »
Tried   _Wblock   and that does not remove the Anonymous Blocks...!



Thanks,
Vince

to do for the selected objects and select all

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Help to Reduce Extremely Large Drawing File Size
« Reply #6 on: December 06, 2012, 03:28:20 PM »
I use the code posted by MP here:
http://www.theswamp.org/index.php?topic=9433.msg121365#msg121365

This usually sheds some light on what is going wrong with a drawing.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Help to Reduce Extremely Large Drawing File Size
« Reply #7 on: December 06, 2012, 06:02:30 PM »
I use the code posted by MP here:
http://www.theswamp.org/index.php?topic=9433.msg121365#msg121365

This usually sheds some light on what is going wrong with a drawing.

1+, a great application  8-)

Pepe

  • Newt
  • Posts: 85
Re: Help to Reduce Extremely Large Drawing File Size
« Reply #8 on: December 09, 2012, 07:47:10 AM »
Hi...

- Take a look within dictionaries ->'namedobjdict': sometimes you'll find tons of useless scale-lists and similiars.
- Look for unnamed groups: I found about 10.000 of them in a file!

Regards.

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Help to Reduce Extremely Large Drawing File Size
« Reply #9 on: December 09, 2012, 08:01:51 AM »
If, as I suspect, it is anonymous groups (*A###) that are bloating the drawing file, you could use the following code to delete any anonymous groups in the file (this will not delete any graphical objects):

Code - Auto/Visual Lisp: [Select]
  1. (defun c:delanongroups ( / i )
  2.     (setq i 0)
  3.         (if
  4.             (and (wcmatch (vla-get-name group) "`**")
  5.                 (not
  6.                     (vl-catch-all-error-p
  7.                         (vl-catch-all-apply 'vla-delete (list group))
  8.                     )
  9.                 )
  10.             )
  11.             (setq i (1+ i))
  12.         )
  13.     )
  14.     (if (< 0 i)
  15.         (princ (strcat "\n" (itoa i) " anonymous group" (if (= 1 i) "" "s") " deleted."))
  16.         (princ "\nNo anonymous groups deleted.")
  17.     )
  18.     (princ)
  19. )


Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Help to Reduce Extremely Large Drawing File Size
« Reply #10 on: December 09, 2012, 09:29:54 AM »
If you're using a vertical app, you can use the AECTOACAD command and export the current DWG to a new DWG with all AEC objects exploded and broken down to their basic components (I.E. lines, arcs, text).
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

hermanm

  • Guest
Re: Help to Reduce Extremely Large Drawing File Size
« Reply #11 on: December 10, 2012, 09:12:52 AM »
File attached has a LISTGROUPS command, which may be useful as a diagnostic.
Verbose mode lists # entities & selectability for each group.
I've seen files with as many as 10,000 (really!) null groups.

PeTRaS

  • Mosquito
  • Posts: 1
Re: Help to Reduce Extremely Large Drawing File Size
« Reply #12 on: November 26, 2014, 01:22:59 PM »
I had a similar problem: large file size on small drawing (75 polylines, 25 text objects and ...4000 anonymous groups). All good lisp for drawing cleaning or  anon groups removing not worked (yes and wblock not worked !).My solutions:
1.Save file to dxf
2.Close
3.Open
4.Save to dwg
5.Audit
6.Purge
If after step 4 i use explodeproxy from A.Rivilis, it remove 4000 dgn records.

mammajamma

  • Guest
Re: Help to Reduce Extremely Large Drawing File Size
« Reply #13 on: November 26, 2014, 02:18:40 PM »
Try WBlock, clicking as your selection "Entire Drawing".
This will create a new file, Layout and Model intact.
You select nothing except to navigate to where you want the file and what to name it. (I usually just add XX to the end of the existing file name, then go back and delete the old file before renaming the new one.)
I know, sounds like it would do essentially the same as "SaveAs", but it miraculously leaves behind lots of junk.

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Help to Reduce Extremely Large Drawing File Size
« Reply #14 on: November 26, 2014, 03:45:58 PM »
Here is how we fix problematic drawings:
  • Open with RecoverAll
  • Audit & Purge
  • Wblock the drawing using a window to select objects. NOTE: It is extremely important to not use a crossing window, type All or use "Entire Drawing", as these can all bring the errors over. If you have multiple layout tabs, you will need to wblock them out to separate CAD files and merge them back together.
  • Open each drawing and audit and purge again
  • Merge drawings back together as needed
  • Use the code posted earlier in this thread to remove anonymous groups
  • Use the overkill command to remove any overlapping linework
  • Remove any unused annotation scale lists
  • Audit & Purge again
NOTE: About purging, make sure that you purge Regapps as well, this can only be done with the -purge command or a LISP routine setup to do this.

Yes, this is an annoyingly long list, but this works 99.99% of the time and you will end up with a good drawing that doesn't slow everything down.