Select to view content in your preferred language

Deleting intermediate data in ModelBuilder

4615
9
09-27-2013 06:46 AM
by Anonymous User
Not applicable
Hello guys,

I've set up a simple model to run, however, I can't seem to get the intermediate data to automatically delete.  I've read a couple articles and it appears that if you run a saved model from the dialog box, which I've been doing, the intermediate data should automatically be deleted(if it's checked as intermediate in the modelbuilder window).  Every time I run the model, I still get the intermediate data. Any idea what I'm doing wrong? Thanks in advance, guys.

Nick
Tags (2)
0 Kudos
9 Replies
TimWitt
Deactivated User
James, could you post a picture of your model?
0 Kudos
TimWitt
Deactivated User
James,

also make sure to click delete intermediate data in your model.

http://resources.esri.com/help/9.3/arcgisdesktop/com/gp_toolref/automating_your_work_with_models/del...
0 Kudos
by Anonymous User
Not applicable
It won't let me add an image with the image button nor will it let me copy and paste the image into the box. Hopefully the image is attached but it didn't give me any confirmation.

I've tried clicking the "Delete Intermediate Data" box but it doesn't appear to do anything.  I don't get a check mark next to the option and when I save the model after I press this option, it still saves the intermediate data. Thanks again for your help, guys.
0 Kudos
TimWitt
Deactivated User
You need to click that option after you run the model, not before. And yes the image is attached, I assume you want to delete the output file in the middle?
0 Kudos
by Anonymous User
Not applicable
Yes, I'm trying to get rid of the original buffer output.

Ok, when I press the "delete intermediate data" button after the model has run, nothing happens.  It has already saved the original buffer and the clipped buffer at that point.

I'm running the model through the dialog box. So you're saying that after I run the model in the dialog box and it's saved the files I right click "edit" on the model(which is the only way to open the model after it's created) and then click the "delete intermediate data" option? If that is what you're trying to get me to do I couldn't get it to do anything. Do you have any other suggestions? Thanks again.
0 Kudos
TimWitt
Deactivated User
You could export your model to python and at the end, delete what you don't need anymore?

i.e.

env.workspace = "C:\Your_Data_Path"
if arcpy.Exists("Output_You_Want_To_Delete.shp"):
    arcpy.Delete_management("Output_You_Want_To_Delete.shp")


You probably don't need the if statement, but it can't hurt.
0 Kudos
by Anonymous User
Not applicable
Shouldn't it be possible without writing a script? I feel like that button is there for a reason. That would mean if I ran that model 100 times I'd have to go in and delete them all individually.
0 Kudos
TimWitt
Deactivated User
The other thing you could do is use the Delete tool. Other than that you either have a something wrong with your installation or you set it up wrong.
0 Kudos
by Anonymous User
Not applicable
Wouldn't you be able to tell if I set it up wrong? It's a pretty simple model, right? Or is there a certain setting in the environments section that needs to be configured? It runs fine, I get what I need. It's just sort of a pain.
0 Kudos