Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having trouble overwriting an output shapefile from ModelBuilder.

The model works great when ran the first time, but I get an '000210 : Cannot create output .' error if I re-run the model. The error states 'The output cannot be created. Potential reasons include data locking, an incorrect path, and limited access rights..'

I've noticed that there is a .lock file associated with the shapefile so I assume this is my problem. I've checked the overwrite outputs of geoprocessing options checkbox in the geoprocessing options.

My model is very simple, I am just using a multivalue iteration to buffer a line segment at different buffer widths and then clipping to a polygon. I am using the inline variable subsitution based off of the buffer value for my output shapefile name.

Anybody know how to fix this? or possible work arounds? I am using ArcMap 10.2

share|improve this question
Are you resetting the model between runs by Validating the entire model before rerunning? The only other thing I can think is if, because it's a shapefile, once added to the map it becomes a separate locked entity in which case just removing that layer from display should unlock it and allow overwriting. ArcGIS sometimes has trouble letting go of things though. – Chris W May 2 '14 at 19:28
Hi Chris. Have tried your suggestions but still the lock file remains! I think you're right, ArcGIS is having a hard time lettting go!! – ChrisA May 2 '14 at 20:00
Have repeatedly and consistently had the same kind of issue on occasion with data in SHP, PGDB, & FGDB. Certain tools and iterators, as best I can figure out, create locks on data that don't release when model's closed. If run from within ArcMap, the locks aren't dropped until arcmap's closed. Same for arccatalog. Only work around I've found is to call the model from within arcpy (do this via python directly, not python window in arcgis) and run the model there. That way you just have to close IDLE/pywin/etc. and all locks should be dropped. Not ideal, but best work-around I've found. – John May 2 '14 at 20:57
Thanks John, I believe you are correct that some tools/iterators create locks and there is no way of losing them without closing ArcMap. Other options I guess, are to delete each shapefile through the ArcCatalog window... what a pain! – ChrisA May 2 '14 at 21:32
Careful on expecting even that to work... Sometimes I've found if you open the model to edit and run it from within the model builder screen, when you close model builder the locks persist and you can't delete the file back in the catalog window. I've found for some models though, if you just run the model from catalog, same as if running a GP tool, rather than opening model to edit and running from model builder, it will more often let you delete the files, at least manually, after the model completes. Again, nothing perfect, but for some models it helps... – John May 2 '14 at 22:06

Your Answer


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

Browse other questions tagged or ask your own question.