14

I have a geoprocessing script that runs the following..

arcpy.AddMessage("TEST...")

Yes just one line of code.

A blank .mxd starts at 391kb for me as I run my script and save the filesize increases.

391 kb
431 kb
451 kb
471 kb
and so on...

A geoprocessing python script seems to increase the filesize by 20-30 kb each time.

I have run this test on an actual script that does something and increases filesize by 40-60 kb...

I have also run on a blank script that does absolutly nothing other than it runs and still increases filesize by 20-30kb...

From what I could find ESRI Tech

file size increase may be caused by a large amount of geoprocessing results stored in the Results tab in ArcToolbox in ArcCatalog.

Following the steps in the article I was able to decrease the filesize from 589 kb to 293 kb by saving it to a new .mxd

Your thoughts, experiences with this? Has anyone found a way to auto-delete the results tab from a python script so that I don't have to save a new .mxd each time?

UPDATE:

@AHIGH I have tried playing around with the Geoprocessing options as suggested by AHIGH. Does not seem to stop the filesize from increasing.

@artwork21 If I go to geoprocessing > results and delete the results this WILL decrease the filesize. Is there anyway to automate this process so that the results are auto-deleted after the script has run?

ESRI: Using geoprocessing options to control tool execution

Any tool results still in the ArcMap table of contents will be saved to disk, regardless of the temporary results setting. This is because geoprocessing has to assume that by saving a map document, you want everything in the ArcMap table of contents saved

I want everything to save except for the results that bloat my filesize...

If you don't want to save the map document, but you do want to save the data in an individual layer, right-click the layer and click Data > Make Permanent.

Not really a practical solution...

In 10.1 there are new features that would allow me to fix my problem. Guess will have to try to push my company to upgrade to 10.1 ASAP.

Python Tool

WORKAROUND SOLUTION:

Under Geoprocessing > Geoprocessing Options > Results Management > "Keep results younger than:" > Set to Never Save.

This will stop the filesize from increasing.

Alternatively, you can try to write your scripts so that the run independently of Arcmap (ie. Without it open).

You can write more efficient code, that runs faster. Like a script that runs multiple mxd's at once.

1
  • 1
    If you're running this from ArcMap have you tried turning off "Log geoprocessing operations to a log file" within the Geoprocessing options?
    – AHigh
    Commented Jun 27, 2012 at 15:55

1 Answer 1

13

I would guess it has something to do with recording the geoprocessing results info.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.