Author Topic: How to reduce the file size.  (Read 29239 times)

0 Members and 1 Guest are viewing this topic.

mammajamma

  • Guest
Re: How to reduce the file size.
« Reply #45 on: July 03, 2012, 09:57:53 AM »
I have mine set to "check web for live enablers" and "object detect and command invoke". And I was using the file from post #10.
I use the wblock method all the time on stubborn drawings, when there's crap that won't purge. Works better than copy/paste which tends to drag junk along with the objects selected.
I don't even know why it works, since "entire drawing" would imply that all the crap would also be included, but that's not the case.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: How to reduce the file size.
« Reply #46 on: July 03, 2012, 10:16:03 AM »
I also use it for stubborn DWGs. And my settings are also set to check web & detect & invoke. Though I've manually installed some previously.

Usually the WBlock cleans up much better than anything else (without raw programming). And the nicest thing about it (in relation to copy-n-paste or wblock selected - which is exactly the same thing) is that your Layout tabs also goes with. The only hiccup I've found previously is that named page setups not assigned to Layouts aren't included, but that's as I'd have expected.

The only other place I've run into this same scenario is with Data Links. If you copy an Excel sheet and paste as linked AutoCAD entities (i.e. a linked table) a Data Link dictionary item is created each time. If you delete / explode / unlink the table that dictionary isn't also deleted. If there's no linked table then WBlock Entire DWG clears the issue, but if you've got say 10 of these links and only one still linked table it copies all 10 links to the new DWG. In this case copy-n-paste / wblock selected works better in that if you don't select the table none of the links are also copied. That was one of the original reasons I created the DictEdit routine.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

HasanCAD

  • Swamp Rat
  • Posts: 1422
Re: How to reduce the file size.
« Reply #47 on: July 04, 2012, 05:25:52 AM »
Groups is not a Dictionary, but a Collection.
...
What is deference between a collection and a dictionary?
and are there another types than these 2 in dag file?

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: How to reduce the file size.
« Reply #48 on: July 04, 2012, 05:58:59 AM »
Every dictionary is a collection, but not every collection is a dictionary.

Actually the reason Groups is not filed under the NamedObjDict collection is because it was something older (more like a table). A table is also a "collection", but it was implemented way back in the 80's ... just not removed & replaced by dictionaries since that would cause problems. If you look at the ActiveX object of the DWG file you can see most of these "tables" as collections of that object. Open the text screen (F2) and type the following at the command prompt:
Code: [Select]
(vl-load-com)
(vlax-dump-object (vla-get-ActiveDocument (vlax-get-acad-object)))
You'll see all sorts of "Properties" of the document. Some of them are other objects, and some of those are collections of other objects. E.g. the Blocks property links to the Blocks collection (which is actually the Blocks table. The Dictionaries property likewise links to the NamedObjDict collection. The Groups property links to the Groups collection. Etc. etc. etc.

The issue with some things in one place and others in another place is due to the long history of changes in acad. AutoDesk periodically added not just new features, but also new structures inside the DWG file to hold those features. E.g. the old table structures could not be tied onto other objects. For that XData was allowed, but this had some serious restrictions like a maximum amount of data and only some data types allowed in some codes. E.g. the description of a Layer is attached to that layer's table entry as xdata.

Thus the dictionaries were implemented, which allows data to be stored not just for the DWG file as a whole, but also tied onto any other object. E.g. the AnnoScales are stored as a dictionary under the NamedObjDict collection. But the links for each annotative object to the scales attached to that object are stored as Dictionaries attached to that object itself. Also a dictionary / its XRecord items do not have such restrictions as XData does. Thus a dictionary (or even just one entry inside it) may contain anything between 0 bytes and the maximum your PC would handle before crashing. Unfortunately some programmers didn't think about their use of dictionaries enough, thus you end up with these dictionaries cluttering the DWG file and having difficulty purging them out when not needed anymore.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.