1

I built a simple tool that creates 2 file GDBs for my work needs, and another to delete them after the job is done.

Create GDB

Delete GDB

When the GDBs are empty, the delete tool works fine. However, when there are files in them, I can't use this tool to delete the GDBs, and this error pops:

Error 601

If I manually delete all the files, then the tool works.

Suggestions?

  • 1
    You may be running into a problem where the operation that adds layers to the File GDB is adding them to your Table of Contents in ArcGIS as well, but not showing this because the table of contents is not refreshing. I have seen this happen. That would then leave a lock on the FileGDB, thus not allowing you to delete it. Check to make sure that the layers that have been added to the FileGDB are not referenced anywhere else, and also that all processes involving the FileGDB have completed prior to running the delete model. – Get Spatial Apr 9 '13 at 15:07
  • As far as I recall, I tried to do that, but I might have missed this while checking and rechecking all the possible causes. I will try your suggestion tomorrow, thanks. – HDunn Apr 9 '13 at 17:23
2

I've been having the same problem when I trying to create a model with Iterate and and the only way I found to fix it was unchecking 'Intermadiate" processes. It worked very well.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • Please, is it correct now? I hope so, thanks. – Flavio Felix Aug 17 '18 at 15:20
1

Take a look at using the in_memory workspace in Modelbuilder rather than creating temporary GDBs.

From: http://resources.arcgis.com/en/help/main/10.1/index.html#/Using_in_memory_workspace/002w0000005s000000/

"Data written to the in-memory workspace is temporary and will be deleted when the application is closed."

However, depending on the size/intensity of your processing, using in_memory may also choke your system resources. Since you're trying to delete the results quickly anyway, it may still be a viable option (and even a little faster to boot!).

1

As Get Spatial suggested, it was indeed a problem with the created features being added to the Table of Contents, for I had checked the "add to display" option in one of the tools that I made to create the files.

Once I unchecked that option, the files were created in their respective file GDB without being added to the ToC, making the deletion of said GDBs work as it should.

Uncheck add to display

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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