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 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?

HDunn.

share|improve this question
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 Answers 2

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!).

share|improve this answer
up vote 1 down vote accepted

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

share|improve this answer

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.