Jump to content

compress max file


Crazy Homeless Guy
 Share

Recommended Posts

i have a max file that has slowly become unbearable to open. iyesterday it grew from 25 megs to 99 megs, and i really didn't do much. i am not using radiosity, so there is no mesh or anythinglike that. i can't find duplicate object or anything.

 

i think it needs cleaned (remove excess info) somehow to remove exess info, but i am not sure if there is a way to do this.

 

i was merging scenes about the time the size went wa-wa, so i think unused info from the scenes must have transfered into my file.

 

any ideas?

Link to comment
Share on other sites

As long as there arent any linked dwgs in the file, you could try the "save selected" option...simply select the objects you want to keep and use the save selected. That might get rid of some extra junk. Is there some sort of purge utility for MAX someone knows of?

 

-Chad

Link to comment
Share on other sites

Well, a friend of mine came across the same problem today... I'll say exactly what I told him, hope it helps...

1) If you're using Max 6, try changing its default mode to DesignVIZ. I did it once and it worked (not a lot, but there was some difference)

2) Check your modifier stack. It's likely you have a certain amount of useless modifiers on it, and you could collapse them.

3) You also could try Xref-ing your scenes instead of merging them.

Link to comment
Share on other sites

I have linked DWG's, XREF'd files, and XREF'd scenes in the file.

 

What happened...

 

The scene has about 100 IES lights that were becoming difficult to deal with. I merged the lights into a new max file, and sorted them out into layers, so I could turn off the ones I didn't want by layer.

 

I then went back to the original Max file, and deleted all of the lights. Then I merged the lights from the new file back into the original file. Now they are on layers that I can turn on and off.

 

Somewhere in that sequence my file size grew extremely large, so I am assuming that lots of information was being carried around during the merges.

 

The way the file is set up, it is relatively complex, and would not be easy to recreate. It works the way it is now, but takes about half of an hour to open.

Link to comment
Share on other sites

  • 1 month later...

YOU ARE A LIFESAVER!!!.....I found the topic, but I have no idea what the solution does! File went from 99 MB to 4 MB. In case anyone needs the info:

 

open up xref object dialog and hit the close button. Do the same in xref scene. Then, in the little white dialog box in the left bottom left corner, type gc() and hit enter.

 

-Chad

Link to comment
Share on other sites

taken from the maxscript reference:

 

Manual Garbage Collection

The function gc() invokes the garbage collector. Normally, the collector runs automatically when available memory runs low, so you don't normally need to call it explicitly. However, in some situations, it is useful to be able to force a collect to ensure a pause due to garbage collection will be delayed as long as possible.

 

You can also invoke the collector to cause any unreferenced open files to be closed. In some situations, a file can be left open if a runtime error occurs while it is still open. If the file object was being held in a local variable at this point, it may not be possible to get at it from the Listener to force a close. Any subsequent attempts to open it may result in an "already open" error from the operating system. Running the collector will cause the file object to be reclaimed and this forces any open file associated with it to be closed.

 

gc [light:false]

 

This function returns the number of bytes free in the MAXScript heap after collection. Note that the collector may take many seconds to run if the heap is full of many small reclaimable objects.

Link to comment
Share on other sites

Now that I have discovered how to fix my problem, I have noticed that a bunch of my files have become bloated. I was working on a file today that started out as 1.5 MB, then worked on it some (not crashing at all) saved it, then it jumped to 47 MB. Doing the gc() thing dropped it back down to 1.5 MB. Is there a reason this is happening?

 

-Chad

Link to comment
Share on other sites

  • 1 year later...
taken from the maxscript reference:

 

Manual Garbage Collection

The function gc() invokes the garbage collector. Normally, the collector runs automatically when available memory runs low, so you don't normally need to call it explicitly. However, in some situations, it is useful to be able to force a collect to ensure a pause due to garbage collection will be delayed as long as possible.

 

You can also invoke the collector to cause any unreferenced open files to be closed. In some situations, a file can be left open if a runtime error occurs while it is still open. If the file object was being held in a local variable at this point, it may not be possible to get at it from the Listener to force a close. Any subsequent attempts to open it may result in an "already open" error from the operating system. Running the collector will cause the file object to be reclaimed and this forces any open file associated with it to be closed.

 

gc [light:false]

 

This function returns the number of bytes free in the MAXScript heap after collection. Note that the collector may take many seconds to run if the heap is full of many small reclaimable objects.

 

 

wow, great info... thanx...

i've always used the GC, but never knew what it meant. and u made that a nice find in the maxscript reference... i guess we should consult the references more often...:rolleyes:

Link to comment
Share on other sites

hi everyone,

 

this is a known issue with max6 and has in some cases carried over to max7 files. solution 2 on this support page is the best fix...

 

http://usa.autodesk.com/adsk/servlet/ps/item?id=5582236&linkID=5573345&siteID=123112

 

the problem can transfer from file to file if you open a file with the problem and then in the same session open another file and save it. in the latest release of max8 this problem has been fixed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...