kimo

How do you force a GP tool to release it's output

Discussion created by kimo on Apr 3, 2013
Latest reply on Nov 27, 2013 by saschwarzer1
I can see that I get a file lock on the KMZ output file after using MapToKML_conversion while still in the script, or still in Pythonwin. (I can't rename it, delete it etc). 10.1 SP1.
My workflow exports the map to a KMZ and then needs to upzip the file to extract the doc.kml inside.
If I re-run the script without editing I trip up on this file lock.

If I exit Pythonwin something cleans up the lock, so what could I do inside the script?
I have tried a del arcpy without success. Some people have success by encapsulating the tool in a function.
Sometimes an arcpy.RefreshCatalog() works with featureclasses, but in this case it is a system file.

A with... gpTool: would be nice!
Maybe it is just another Annoyance.

Outcomes