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

0 Members and 1 Guest are viewing this topic.

kruuger

  • Swamp Rat
  • Posts: 625
Re: How to reduce the file size.
« Reply #30 on: July 02, 2012, 07:19:53 PM »
MeasureUp, mammajamma what software are you using to wblock, copy, paste method ?
i doesn't work for me like irneb mentioned earlier.

kruuger

MeasureUp

  • Bull Frog
  • Posts: 462
Re: How to reduce the file size.
« Reply #31 on: July 03, 2012, 12:09:31 AM »
MeasureUp, mammajamma what software are you using to wblock, copy, paste method ?
i doesn't work for me like irneb mentioned earlier.

kruuger
AutoCAD 2011.
It is version regardless for copy-n-paste.
Simply copy the line then paste to another drawing.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: How to reduce the file size.
« Reply #32 on: July 03, 2012, 02:42:18 AM »
Exactly. Here's a screen capture to show that neither the Copy-n-Paste nor the WBlock reduces the filesize at all.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

HasanCAD

  • Swamp Rat
  • Posts: 1420
Re: How to reduce the file size.
« Reply #33 on: July 03, 2012, 03:55:48 AM »
...
I have the same problem the files comes huge.
I used your tool Dictionary Editing tools. it taking long time but not working with file around 5MB. and working with small file around 0.5 MB

kruuger

  • Swamp Rat
  • Posts: 625
Re: How to reduce the file size.
« Reply #34 on: July 03, 2012, 04:40:43 AM »
...
I have the same problem the files comes huge.
I used your tool Dictionary Editing tools. it taking long time but not working with file around 5MB. and working with small file around 0.5 MB
Code - Auto/Visual Lisp: [Select]
  1. (dictremove (namedobjdict) "AEC_DISP_REPS")
  2. (dictremove (namedobjdict) "AEC_DISPLAY_PROPS_DEFAULTS")
kruuger

HasanCAD

  • Swamp Rat
  • Posts: 1420
Re: How to reduce the file size.
« Reply #35 on: July 03, 2012, 05:02:16 AM »
...
kruuger
The file almost the same

kruuger

  • Swamp Rat
  • Posts: 625
Re: How to reduce the file size.
« Reply #36 on: July 03, 2012, 05:25:39 AM »
...
kruuger
The file almost the same
after deleting these dictionary file is around 100kb, but save is still "heavy"
kruuger

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: How to reduce the file size.
« Reply #37 on: July 03, 2012, 05:55:48 AM »
Yes the DictEdit might fail if the list it's trying to display is huge - it's trying to display all items in that listbox on the dialog.

To find out which thing has a lot of items, I'd go with MP's routine (as Lee's linked to in post #12). From that you should be able to pick up what the dictionary name is, then use Kruuger's idea to remove the dictionary - you should then be able to purge normally.

E.g. running the Counts command from MP's routine:
Code: [Select]
...
Dictionaries.Count = 14
    ACAD_CIP_PREVIOUS_PRODUCT_INFO has no <Count> property.
    ACAD_COLOR.Count = 0
    ACAD_DGNLINESTYLECOMP.Count = 21135
    Groups.Count = 0
    Layouts.Count = 3
    Nameless, Handle=72.Count = 3
    ACAD_MLEADERSTYLE.Count = 2
    ACAD_MLINESTYLE.Count = 1
    PlotConfigurations.Count = 0
    ACAD_PLOTSTYLENAME.Count = 1
    ACAD_SCALELIST.Count = 33
    ACAD_TABLESTYLE.Count = 1
    ACAD_VISUALSTYLE.Count = 24
    AcDbVariableDictionary.Count = 7
DimStyles.Count = 3
Groups.Count = 0
Layers.Count = 1
Layouts.Count = 3
Linetypes.Count = 2173
RegisteredApplications.Count = 8
Modelspace.Count = 1
Paperspace.Count = 0
Again, as Kruuger's mentioned earlier ... simply remove the offending dictionary:
Code: [Select]
(dictremove (namedobjdict) "ACAD_DGNLINESTYLECOMP")And for the 2nd version:
Code: [Select]
Command: COUNTS
Blocks.Count = 4
    *Model_Space.Count = 0
    *Paper_Space.Count = 2
    EC_TICK.Count = 3
    EC-Arrow.Count = 1
Dictionaries.Count = 29
    ACAD_BACKGROUND.Count = 0
    ACAD_CIP_PREVIOUS_PRODUCT_INFO has no <Count> property.
    ACAD_COLOR.Count = 1
    Nameless, Handle=24D6DA has no <Count> property.
    Groups.Count = 0
    ACAD_IMAGE_DICT.Count = 1
    Nameless, Handle=29399 has no <Count> property.
    Layouts.Count = 2
    Nameless, Handle=10.Count = 3
    ACAD_MLEADERSTYLE.Count = 1
    ACAD_MLINESTYLE.Count = 1
    PlotConfigurations.Count = 26
    ACAD_PLOTSTYLENAME.Count = 1
    ACAD_SCALELIST.Count = 86
    ACAD_TABLESTYLE.Count = 1
    ACAD_VISUALSTYLE.Count = 26
    AcadDim has no <Count> property.
    AcDbVariableDictionary.Count = 11
    ADS_HISTORY.Count = 1
    AEC_CLASSIFICATION_SYSTEM_DEFS.Count = 0
    AEC_DISP_REP_CONFIGURATIONS.Count = 5
    AEC_DISP_REP_SETS.Count = 10
    AEC_DISP_REPS.Count = 151
    AEC_DISPLAY_PROPS_DEFAULTS.Count = 142
    AEC_LAYERKEY_STYLES.Count = 3
    AEC_PROPERTY_SET_DEFS.Count = 0
    AEC_VARS.Count = 3
    ASE_INDEX_DICTIONARY.Count = 1
    BNS_VARIABLES.Count = 1
DimStyles.Count = 2
Groups.Count = 0
Layers.Count = 3
Layouts.Count = 2
Linetypes.Count = 3
RegisteredApplications.Count = 10
Modelspace.Count = 0
Paperspace.Count = 2
However, a straight open and save reduces that particular file from 5.5MB to 206kB. Those AEC dictionaries are usually from some vertical product like ACA - thus ACad generally fixes issues on these with a simple open & save.

If I further use my DictEdit or follow Kruuger's idea to remove all AEC (and such), then do a purge regapps and all that, the file furthe4r reduces in size to 132kB.

It might be that those entities (e.g. the purge RegApps show some others removed) are using custom ARX objects. You might need to download the object enablers from ADesk:
Code: [Select]
Command: -PU
-PURGE
Enter type of unused objects to purge
[Blocks/Dimstyles/Groups/LAyers/LTypes/MAterials/MUltileaderstyles/Plotstyles/SH
apes/textSTyles/Mlinestyles/Tablestyles/Visualstyles/Regapps/Zero-length
geometry/Empty text objects/All]: r
Enter name(s) to purge <*>:
Verify each name to be purged? [Yes/No] <Y>: n
Deleting registered application "ACAD_MLEADERVER".
Deleting registered application "AcAecLayerStandard".
Deleting registered application "AECBASE".
Deleting registered application "DCO15".
Deleting registered application "REVIT".
5 registered applications deleted.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: How to reduce the file size.
« Reply #38 on: July 03, 2012, 06:20:07 AM »
BTW, here's a much more simplistic method of getting hold of all the dictionaries attached to the document (note-not attached direct to entities - which is a different matter).
Code - Auto/Visual Lisp: [Select]
  1. (defun dt:dxf-dictlst  (dxf /)
  2.          (mapcar '(lambda (a b) (cond ((and (= (car a) 3) (= (car b) 350)) (list (cons (cdr a) (cdr b))))))
  3.                  dxf
  4.                  (cdr dxf))))
  5.  
  6. (defun dt:countitems (ename /) (length (dt:dxf-dictlst (entget ename))))
  7.  
  8. (defun dt:getdicts (/) (mapcar '(lambda (a) (list (car a) (cdr a) (dt:countitems (cdr a)))) (dt:dxf-dictlst (entget (namedobjdict)))))
  9.  
  10. (defun c:CountDicts ()
  11.   (foreach d (dt:getdicts) (print d))
  12.   (princ))
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

HasanCAD

  • Swamp Rat
  • Posts: 1420
Re: How to reduce the file size.
« Reply #39 on: July 03, 2012, 09:04:30 AM »
using MP tool gives this data
Code: [Select]
Command: COUNTS
Blocks.Count = 4
    *Model_Space.Count = 0
    *Paper_Space.Count = 2
    EC_TICK.Count = 3
    EC-Arrow.Count = 1
Dictionaries.Count = 28
    ACAD_ASSOCNETWORK.Count = 1
    ACAD_BACKGROUND.Count = 0
    ACAD_COLOR.Count = 1
    Nameless, Handle=24D6DA has no <Count> property.
    Groups.Count = 238571
    ACAD_IMAGE_DICT.Count = 1
    Nameless, Handle=29399 has no <Count> property.
    Layouts.Count = 2
    Nameless, Handle=10.Count = 3
    ACAD_MLEADERSTYLE.Count = 1
    ACAD_MLINESTYLE.Count = 1
    PlotConfigurations.Count = 26
    ACAD_PLOTSTYLENAME.Count = 1
    ACAD_SCALELIST.Count = 86
    ACAD_TABLESTYLE.Count = 1
    ACAD_VISUALSTYLE.Count = 26
    AcadDim has no <Count> property.
    ACDB_RECOMPOSE_DATA has no <Count> property.
    AcDbVariableDictionary.Count = 11
    ADS_HISTORY.Count = 1
    AEC_CLASSIFICATION_SYSTEM_DEFS.Count = 0
    AEC_DISP_REP_CONFIGURATIONS.Count = 5
    AEC_DISP_REP_SETS.Count = 10
    AEC_LAYERKEY_STYLES.Count = 3
    AEC_PROPERTY_SET_DEFS.Count = 0
    AEC_VARS.Count = 3
    ASE_INDEX_DICTIONARY.Count = 1
    BNS_VARIABLES.Count = 1
DimStyles.Count = 1
Groups.Count = 238571
Layers.Count = 2
Layouts.Count = 2
Linetypes.Count = 3
RegisteredApplications.Count = 8
Modelspace.Count = 0
Paperspace.Count = 2

the Dic Groups.Count = 238571 is huge

as Kruuger
Code: [Select]
(dictremove (namedobjdict) "Groups")but not working, and the file size still as it is.

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: How to reduce the file size.
« Reply #40 on: July 03, 2012, 09:08:47 AM »
Groups is not a Dictionary, but a Collection.

To remove all Groups, use this:

Code - Auto/Visual Lisp: [Select]

kruuger

  • Swamp Rat
  • Posts: 625
Re: How to reduce the file size.
« Reply #41 on: July 03, 2012, 09:17:00 AM »
using MP tool gives this data
Code: [Select]
Command: COUNTS
Blocks.Count = 4
    *Model_Space.Count = 0
    *Paper_Space.Count = 2
    EC_TICK.Count = 3
    EC-Arrow.Count = 1
Dictionaries.Count = 28
    ACAD_ASSOCNETWORK.Count = 1
    ACAD_BACKGROUND.Count = 0
    ACAD_COLOR.Count = 1
    Nameless, Handle=24D6DA has no <Count> property.
    Groups.Count = 238571
    ACAD_IMAGE_DICT.Count = 1
    Nameless, Handle=29399 has no <Count> property.
    Layouts.Count = 2
    Nameless, Handle=10.Count = 3
    ACAD_MLEADERSTYLE.Count = 1
    ACAD_MLINESTYLE.Count = 1
    PlotConfigurations.Count = 26
    ACAD_PLOTSTYLENAME.Count = 1
    ACAD_SCALELIST.Count = 86
    ACAD_TABLESTYLE.Count = 1
    ACAD_VISUALSTYLE.Count = 26
    AcadDim has no <Count> property.
    ACDB_RECOMPOSE_DATA has no <Count> property.
    AcDbVariableDictionary.Count = 11
    ADS_HISTORY.Count = 1
    AEC_CLASSIFICATION_SYSTEM_DEFS.Count = 0
    AEC_DISP_REP_CONFIGURATIONS.Count = 5
    AEC_DISP_REP_SETS.Count = 10
    AEC_LAYERKEY_STYLES.Count = 3
    AEC_PROPERTY_SET_DEFS.Count = 0
    AEC_VARS.Count = 3
    ASE_INDEX_DICTIONARY.Count = 1
    BNS_VARIABLES.Count = 1
DimStyles.Count = 1
Groups.Count = 238571
Layers.Count = 2
Layouts.Count = 2
Linetypes.Count = 3
RegisteredApplications.Count = 8
Modelspace.Count = 0
Paperspace.Count = 2

the Dic Groups.Count = 238571 is huge

as Kruuger
Code: [Select]
(dictremove (namedobjdict) "Groups")but not working, and the file size still as it is.
there was no Group in your file. what file are you checking  :-o
k.

mammajamma

  • Guest
Re: How to reduce the file size.
« Reply #42 on: July 03, 2012, 09:31:02 AM »
MeasureUp, mammajamma what software are you using to wblock, copy, paste method ?
i doesn't work for me like irneb mentioned earlier.

kruuger

AutoCAD 2012. Plain old WBLOCK, then the pickbox that says "Entire drawing" next to Source at the top. (instead of "Block" or "Objects"). Then saved it with a different file name. Nothing fancy.

kruuger

  • Swamp Rat
  • Posts: 625
Re: How to reduce the file size.
« Reply #43 on: July 03, 2012, 09:45:37 AM »
MeasureUp, mammajamma what software are you using to wblock, copy, paste method ?
i doesn't work for me like irneb mentioned earlier.

kruuger

AutoCAD 2012. Plain old WBLOCK, then the pickbox that says "Entire drawing" next to Source at the top. (instead of "Block" or "Objects"). Then saved it with a different file name. Nothing fancy.
yes, but it doesn't work on my side - 2012 also.
even copy-paste. when ctrl+c autocad freeze so i know that dictionary is also copied.
kruuger

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: How to reduce the file size.
« Reply #44 on: July 03, 2012, 09:49:55 AM »
AutoCAD 2012. Plain old WBLOCK, then the pickbox that says "Entire drawing" next to Source at the top. (instead of "Block" or "Objects"). Then saved it with a different file name. Nothing fancy.
AutoCAD 2011.
It is version regardless for copy-n-paste.
Simply copy the line then paste to another drawing.
There must be something else going on. With HasanCad's drawing your methods work fine - though I don't need them for the tst.dwg file in post #34.

It's the dwg in post #10 that does not reduce in size with the WBlock or the Copy-n-Paste idea. See my video screen capture in post #33.

There must be something different between yours and mine (including Kruuger's) ACad setups. Perhaps something to do with object enablers?
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.