Overwrite/Delete of feature classes in geodatabase fails because of an existing lock

3887
4
05-05-2015 11:55 PM
MarlenaGötza
New Contributor II

Hello,

I created a model that works like you can see in the picture. I am running an iteration over a field value and want to create a geometric network for each output of the iteration and some operations after it. To do this I always want to copy the needed feature classes to a new geodatabase. The reason why I do this is because otherwise I always have to select the participating feature classes for the geometric network manually.

Now, the problem is that the iteration fails after the first run because the feature classes in the new geodatabase cannot be overwritten. There is an existing lock because they are still part of the geometric network of the former iteration step that still exists. How can I remove this lock or overwrite/delete the feature classes or geometric network in the new geodatabase in each iteration step?

Thanks for your help,

Marlena

0 Kudos
4 Replies
JayantaPoddar
MVP Esteemed Contributor

Hi Marlena,

Go to Geoprocessing > Geoprocessing Options.

The "Overwrite the outputs..." option should be checked.



Think Location
0 Kudos
MarlenaGötza
New Contributor II

It is checked already

0 Kudos
MarlenaGötza
New Contributor II

The feature classes are locked because the geometric network still exists. I guess that is the problem and I only can delete it after I closed ArcMap completely.

0 Kudos
SepheFox
Frequent Contributor

Hi Marlena, a very similar question to your was solved in the forum recently. Unfortunately the solution meant using Python. Anyway, you can read the thread here: Delete or ovewriting existing data in model builder

0 Kudos