Author Topic: Are there anymore tools to clean a drawing of junk?  (Read 11212 times)

0 Members and 1 Guest are viewing this topic.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Are there anymore tools to clean a drawing of junk?
« on: February 11, 2009, 09:39:58 AM »
I am getting a coordination drawing from food industry engineer (I don't know what to call them) that bloated with stuff and I have to beat the heck out of it just to get it be usable.  Just by opening and saving the drawing I knock it down from 37 meg to 14 meg.  After hitting it with the following routines I get it down to 12 meg.

copy of delnul.lsp
Delete zero length lines in drawing
QuickClean

The drawing contains a smattering of 3d objects, 2d objects and objects that are 2d but were 3d at one time.   What is also hurting performance is that the drawings is very far from 0,0 but that is due to this being a huge plant for some reason way before this project they pick the lower left corner of the property as the 0,0 for all cad files.  So I have to live with that.

Is there anything that I can throw at?
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

M-dub

  • Guest
Re: Are there anymore tools to clean a drawing of junk?
« Reply #1 on: February 11, 2009, 09:44:17 AM »
layer filters likely have something to do with the file size, too...

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Are there anymore tools to clean a drawing of junk?
« Reply #2 on: February 11, 2009, 09:47:18 AM »
Have a look at this thread, counts.lsp may illuminate the nature of the rubbish.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Are there anymore tools to clean a drawing of junk?
« Reply #3 on: February 11, 2009, 10:12:44 AM »
Per the Counts Lisp
Quote
Command: COUNTS
Blocks.Count = 52
    *MODEL_SPACE.Count = 68050
    *Paper_Space.Count = 2
    _Open90.Count = 3
    _DotSmall.Count = 1
    spanner.Count = 4
    inactive.Count = 5
    doornode.Count = 2
    KIT_2B_M.Count = 136
    RECTANG.Count = 4
    KIT_2B_P.Count = 22
    KIT_2B_F.Count = 3
    KIT_2B_L.Count = 3
    Fork_Truck.Count = 94
    A$C15A444BD.Count = 5
    A$C33915B18.Count = 800
    A$C460E5761.Count = 513
    A$C0613688A.Count = 47
    A$C737226D9.Count = 9
    A$C5C1B2361.Count = 6
    AT1M1PLA$0$MP-004.Count = 4
    AT1M1PLA$0$MV-009.Count = 4
    AT1M1PLA$0$LOOP.Count = 13
    AT1M1PLA$0$MP-010.Count = 3
    AT1M1PLA$0$SBV.Count = 3
    AT1M1PLA$0$PI-314.Count = 4
    AT1M1PLA$0$MP-009.Count = 4
    BRIX.Count = 39
    ICES-Val_BUTTERFLY.Count = 9
    REDUCER_ECC_DOWN.Count = 4
    tank.Count = 58
    vulk bag with pallet.Count = 30
    Bulk Bag conveyor.Count = 175
    Scissor Lift.Count = 12
    S2S-1H BPE 90 Elbow BW.Count = 1
    WK44-1-BW.Count = 4
    7.5HPXP.Count = 1
    S14AWF-2 BPE Ferrule Standard-ISS.Count = 5
    A$C353D2893.Count = 14
    A$C72CA4FE4.Count = 5
    s-802 tank.Count = 8
    tank foundation.Count = 1
    2.5 x 2.5 WE TEE.Count = 3
    A$C15162F42.Count = 3
    S14AWF-1 BPE Ferrule Standard-IBS.Count = 5
    13MHHMCB-1H Clamp.Count = 5
    W45-100.Count = 6
    21MPR-1xH.Count = 4
    2.5 xw shuttle valve.Count = 115
    cip return.Count = 32
    s802 CIP MOdule.Count = 361
    s802.Count = 2253
    FILLER CIP SKID.Count = 467
Dictionaries.Count = 65
    ACAD_BACKGROUND.Count = 0
    ACAD_COLOR.Count = 0
    Groups.Count = 0
    Layouts.Count = 2
    Nameless, Handle=3E57.Count = 3
    ACAD_MLEADERSTYLE.Count = 1
    ACAD_MLINESTYLE.Count = 1
    Nameless, Handle=21701C has no <Count> property.
    PlotConfigurations.Count = 18
    ACAD_PLOTSTYLENAME.Count = 4
    ACAD_SCALELIST.Count = 15
    ACAD_TABLESTYLE.Count = 1
    ACAD_VISUALSTYLE.Count = 16
    Nameless, Handle=1943BF has no <Count> property.
    AcadDim has no <Count> property.
    AcAec.Count = 1
    ACDB_RECOMPOSE_DATA has no <Count> property.
    AcDbVariableDictionary.Count = 9
    AcmDictionary.Count = 2
    AEC_2D_SECTION_STYLES.Count = 0
    AEC_AREA_GROUP_DEFS.Count = 0
    AEC_AREA_MODIFIERS.Count = 0
    AEC_AREA_PROPOSALNAMES.Count = 0
    AEC_AREA_STYLES.Count = 0
    AEC_AREAGROUP_STYLES.Count = 0
    AEC_CLASSIFICATION_SYSTEM_DEFS.Count = 0
    AEC_CLEANUP_GROUP_DEFS.Count = 1
    AEC_CURTAIN_WALL_LAYOUT_STYLES.Count = 0
    AEC_CURTAIN_WALL_UNIT_STYLES.Count = 0
    AEC_DIM_STYLES.Count = 0
    AEC_DISP_REP_CONFIGURATIONS.Count = 12
    AEC_DISP_REP_SETS.Count = 25
    AEC_DISP_REPS.Count = 168
    AEC_DISPLAY_PROPS_DEFAULTS.Count = 163
    AEC_DOOR_STYLES.Count = 6
    AEC_ENDCAP_STYLES.Count = 5
    AEC_LAYERKEY_STYLES.Count = 2
    AEC_MASKBLOCK_DEFS.Count = 0
    AEC_MASS_ELEM_STYLES.Count = 1
    AEC_MATERIAL_DEFS.Count = 1
    AEC_MVBLOCK_DEFS.Count = 1
    AEC_OPENING_ENDCAP_STYLES.Count = 2
    AEC_POLYGON_STYLES.Count = 0
    AEC_PROFILE_DEFS.Count = 23
    AEC_PROPERTY_FORMAT_DEFS.Count = 10
    AEC_PROPERTY_SET_DEFS.Count = 13
    AEC_RAILING_STYLES.Count = 1
    AEC_ROOFSLAB_STYLES.Count = 0
    AEC_ROOFSLABEDGE_STYLES.Count = 0
    AEC_SCHEDULE_TABLE_STYLES.Count = 0
    AEC_SLAB_STYLES.Count = 0
    AEC_SLABEDGE_STYLES.Count = 0
    AEC_SPACE_STYLES.Count = 1
    AEC_STAIR_STYLES.Count = 1
    AEC_STRUCTURALMEMBER_STYLES.Count = 0
    AEC_VARS.Count = 3
    AEC_WALL_STYLES.Count = 7
    AEC_WALLMOD_STYLES.Count = 0
    AEC_WINDOW_ASSEMBLY_STYLES.Count = 0
    AEC_WINDOW_STYLES.Count = 35
    AMG.Count = 0
    AMGSNAPSETTINGS.Count = 0
    ASE_INDEX_DICTIONARY.Count = 1
    BNS_VARIABLES.Count = 4
    Nameless, Handle=1EA636 has no <Count> property.
DimStyles.Count = 1
Groups.Count = 0
Layers.Count = 41
Layouts.Count = 2
Linetypes.Count = 7
RegisteredApplications.Count = 14
Modelspace.Count = 68050
Paperspace.Count = 2
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Are there anymore tools to clean a drawing of junk?
« Reply #4 on: February 11, 2009, 10:19:20 AM »
Ok, now run the 'AnalyzeThis' code in this post (let's find out what makes up that model space count of 68050).
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Are there anymore tools to clean a drawing of junk?
« Reply #5 on: February 11, 2009, 10:22:22 AM »
MP I remember you throwing up the two routines Counts and AnalyzeThis.  So I hit it with the AnalyzeThis also for your benefit.  I don't what it all means except that it counts all stuff in a file.  What I suppose to do with it or how it helps me that I do not know.


Quote
Command: AnalyzeThis
Indexing #<VLA-OBJECT IAcadModelSpace2 284e35d4>

Ordered by object type:

("AcDb3dSolid" 356)
("AcDbArc" 10219)
("AcDbAttributeDefinition" 4)
("AcDbBlockReference" 94)
("AcDbBlockTableRecord" 1)
("AcDbCircle" 1208)
("AcDbEllipse" 111)
("AcDbExtrudedSurface" 1010)
("AcDbHatch" 301)
("AcDbLine" 41713)
("AcDbMText" 256)
("AcDbPolyline" 2649)
("AcDbRegion" 360)
("AcDbSolid" 2)
("AcDbSpline" 8758)
("AcDbSurface" 984)
("AcDbText" 25)

Ordered by object count (descending):

("AcDbLine" 41713)
("AcDbArc" 10219)
("AcDbSpline" 8758)
("AcDbPolyline" 2649)
("AcDbCircle" 1208)
("AcDbExtrudedSurface" 1010)
("AcDbSurface" 984)
("AcDbRegion" 360)
("AcDb3dSolid" 356)
("AcDbHatch" 301)
("AcDbMText" 256)
("AcDbEllipse" 111)
("AcDbBlockReference" 94)
("AcDbText" 25)
("AcDbAttributeDefinition" 4)
("AcDbSolid" 2)
("AcDbBlockTableRecord" 1)

Total object count: 68051
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Are there anymore tools to clean a drawing of junk?
« Reply #6 on: February 11, 2009, 10:22:54 AM »
Ok, now run the 'AnalyzeThis' code in this post (let's find out what makes up that model space count of 68050).
Already ahead of you.  :lol:  See above post.
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Are there anymore tools to clean a drawing of junk?
« Reply #7 on: February 11, 2009, 10:23:38 AM »
I am getting a coordination drawing from food industry engineer (I don't know what to call them) that bloated with stuff and I have to beat the heck out of it just to get it be usable.  Just by opening and saving the drawing I knock it down from 37 meg to 14 meg.  After hitting it with the following routines I get it down to 12 meg.
Have you tried AECTOACAD or exporting it to 2007?  Both basically do the same thing - they strip out all of the AEC junk and turn those "special" objects into blocks and plines... basic AutoCAD entities.

Give it a whirl!
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Are there anymore tools to clean a drawing of junk?
« Reply #8 on: February 11, 2009, 10:31:43 AM »
Well ... what stands out to me are these 2 block definitions:

        A$C33915B18.Count = 800
        A$C460E5761.Count = 513

These are created by CopyClip / PasteClip activities. Seems a pretty high entity count for copy/paste clips.

In model space there are 94 block instances. If said instances are predominantly either of the 2 above your drawing would be rather, ummm, portly.

Knowing your drawing does it seem reasonable that there would be 94 block instances?

Do you know what the majority of those block instances are?

I could pen something to do yet another analysis to examine the block reference distribution but I'd pretty much be fired for working on your stuff rather than my boss' stuff. If the problem remains unanswered by this weekend I'll code something up then. </shrug>
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Are there anymore tools to clean a drawing of junk?
« Reply #9 on: February 11, 2009, 10:34:51 AM »
Have you tried AECTOACAD or exporting it to 2007?  Both basically do the same thing - they strip out all of the AEC junk and turn those "special" objects into blocks and plines... basic AutoCAD entities.

Give it a whirl!
Interesting.  Exported it and then open the file and peform a quick save.

file size 12,809 kb = Before exporting the
file size 11,339 kb = after exporting but before opening the file
file size 12,557 kb = opening and saving the file

I bet my Arch Desktop put the AEC back into the exported file.
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Are there anymore tools to clean a drawing of junk?
« Reply #10 on: February 11, 2009, 12:31:59 PM »
Well ... what stands out to me are these 2 block definitions:

        A$C33915B18.Count = 800
        A$C460E5761.Count = 513

These are created by CopyClip / PasteClip activities. Seems a pretty high entity count for copy/paste clips.

In model space there are 94 block instances. If said instances are predominantly either of the 2 above your drawing would be rather, ummm, portly.

Knowing your drawing does it seem reasonable that there would be 94 block instances?

Do you know what the majority of those block instances are?

Using quick select to Filter for block names, I get the following.  See attached image. 
« Last Edit: February 11, 2009, 12:54:35 PM by krushert »
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Are there anymore tools to clean a drawing of junk?
« Reply #11 on: February 11, 2009, 12:52:33 PM »
Deleted the paper space tab and stuff in that tab.  Reduce the file by less than a 1/10th of meg.

The other thing  I noticed with the blocks is that I can only see and touch 3 blocks with the name fork_truck but the counts is stating that there are 94.  Am I reading info from the counts correctly?

I window selected everything in model space and came back with following from the properties pallet.  It is showing 5 less items than the counts report is showing


I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Are there anymore tools to clean a drawing of junk?
« Reply #12 on: February 11, 2009, 01:04:18 PM »
I could pen something to do yet another analysis to examine the block reference distribution but I'd pretty much be fired for working on your stuff rather than my boss' stuff. If the problem remains unanswered by this weekend I'll code something up then. </shrug>
MP If you want to pen something for something just to mess around - go ahead.  however by comparing what I can select and what your routines came up I don't think there is going to be much savings.  That being said if that little bit will save time on massive time it takes to regen and open/closing of the file than that would be greatly appreciated.

Background
this file and 6 others all get xref to coordination file and when opening that file I have to close all other files or it will crash Acad with a run time error.    Just in opening the file I have enough time to; go to the loo, get a cup of tea and BS the way there and back.


Thanks MP and Guys
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Are there anymore tools to clean a drawing of junk?
« Reply #13 on: February 11, 2009, 01:18:14 PM »
Here is something that will count the inserts of blocks.

Code: [Select]
(defun c:CountBlockInserts (/ EntData tempEnt tempData InsCntList)
   
    (while (setq EntData (tblnext "block" (not EntData)))
        (setq tempEnt (tblobjname "block" (cdr (assoc 2 EntData))))
        (setq tempData (entget tempEnt))
        (setq tempData (entget (cdr (assoc 330 tempData))))
        (if (setq tempData (member '(102 . "{BLKREFS")  tempData))
            (setq InsCntList (cons (cons (cdr (assoc 2 EntData)) (- (length tempData) 2)) InsCntList))
        )
    )
    (foreach i InsCntList
        (print i)
    )
    (princ)
)
Tim

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

Please think about donating if this post helped you.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Are there anymore tools to clean a drawing of junk?
« Reply #14 on: February 11, 2009, 01:29:30 PM »
Here is something that will count the inserts of blocks.

Here is what it came back with
Quote
Command: CountBlockInserts

("FILLER CIP SKID" . 5)
("s802" . 4)
("s802 CIP MOdule" . 4)
("cip return" . 4)
("2.5 xw shuttle valve" . 4)
("21MPR-1xH" . 5)
("W45-100" . 5)
("13MHHMCB-1H Clamp" . 4)
("S14AWF-1 BPE Ferrule Standard-IBS" . 5)
("A$C15162F42" . 6)
("2.5 x 2.5 WE TEE" . 8)
("tank foundation" . 5)
("s-802 tank" . 5)
("A$C72CA4FE4" . 5)
("A$C353D2893" . 5)
("S14AWF-2 BPE Ferrule Standard-ISS" . 5)
("7.5HPXP" . 4)
("WK44-1-BW" . 4)
("S2S-1H BPE 90 Elbow BW" . 6)
("Scissor Lift" . 7)
("Bulk Bag conveyor" . 7)
("vulk bag with pallet" . 11)
("tank" . 4)
("REDUCER_ECC_DOWN" . 5)
("ICES-Val_BUTTERFLY" . 5)
("BRIX" . 4)
("AT1M1PLA$0$MP-009" . 4)
("AT1M1PLA$0$PI-314" . 8)
("AT1M1PLA$0$SBV" . 23)
("AT1M1PLA$0$MP-010" . 6)
("AT1M1PLA$0$LOOP" . 5)
("AT1M1PLA$0$MV-009" . 4)
("AT1M1PLA$0$MP-004" . 5)
("A$C5C1B2361" . 11)
("A$C737226D9" . 11)
("A$C0613688A" . 4)
("A$C460E5761" . 4)
("A$C33915B18" . 5)
("A$C15A444BD" . 19)
("Fork_Truck" . 6)
("RECTANG" . 4)
("spanner" . 4)
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans