Tuesday, September 29, 2020

Troubleshooting Large Files - Audit3dmFiles

I know why my files are too large. It's often due to sloppy modeling, inheriting old pieces, and heavy detail meshes. We are trying our best but sometimes things grow out of control. So what now?

Audit3dmFiles is a rhino command that provides, among other things, a readout of each file size. Below I've created a spreadsheet template to help sort them by file size. Then I go ahead and simplify/delete them individually (SelID). 

1. Audit3dmFiles: Select File. Note that the file grew 7x.


2. Copy readout to Excel. Readout includes file, plugins, material, layer, group, block, and object metadata


3. Extract just the object data into a new worksheet. Use the following formulas to isolate object size and object ID:

    B1: =LEFT(A1,FIND("bytes",A1)-1)

    C1: =INT(RIGHT(B1, LEN(B1) - FIND(":",B1)))

    D1: =LEFT(A1,FIND(", name",A1)-1)

    E1: =RIGHT(D1, LEN(D1) - FIND("=",D1))


Headers were put in for clarity. 


4. Copy all the formulas down, sort by column C, and select Expand Selection. 

5. Copy each column D item. Once inside Rhino, run SelID and paste the ID and zoom to the offending object. Rebuild/ Delete/ Save and watch your file size come back down.

6. Turns out a few minor elements were creating havoc. Reduced the file all the way down to 64MB.

Maybe in the future, I'll create a script to audit and highlight the top 10 items.