Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have been using in_memory workspace within ArcGIS 10.1 ModelBuilder as part of a workflow to mosaic and clip raster datasets to study area bounds (Figure 1). The model runs fine the first round but crashes the program on the second or third run. I suspect two issues may be occuring: 1) Memory limitation are being exceeded or 2) There is conflict when trying to overwrite temp files in_memory.

Is there a way to clear in_memory workspace from within ModelBuilder?

Figure 1.

enter image description here

Edit:

The final model that is now stable

enter image description here

share|improve this question

1 Answer 1

up vote 8 down vote accepted

You can add the Delete tool and specify %in_memory% as the Input Data Element. I would also make mosaic_clp.img a precondition for the Delete operation, to make sure the in_memory workspace isn't cleared prematurely.

share|improve this answer
    
A quick and simple solution. Thanks! –  Aaron Apr 3 '13 at 19:08
    
Happy to help! Also, I haven't checked, but I think you can select in_memory from the Delete tool's dropdown menu -- it wouldn't change the way the model works at all, but it would remove the redundant %in_memory% variable bubble. –  nmpeterson Apr 3 '13 at 20:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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