3

I have grown dependent upon the awesome add-in called Clear Geoprocessing History.

It does not appear to work with my upgrade to 10.2.2

Does someone know of a different route?

Or perhaps how to modify the tool to make it work?

  • Would you be able to edit your question to elaborate on what you mean by "does not appear to work", please? Is there an error message perhaps? – PolyGeo Jan 22 '15 at 22:45
  • The add-in you mentioned above works fine with my 10.2.2.3552 I came across your post, thinking that I have the same problem. Then I realised that you have to mark the datasets in the contents window not in the catalog tree, what I did :-) – EikeMike Jul 4 '16 at 8:52
3

If you're familiar with Python, here's a script provided in an ESRI Technical Article that automates the process of deleting geoprocessing history.

GIS administrators and managers sometimes need to delete geoprocessing history from a feature class' metadata. Instructions provided describe how to do this using a Python script.

The following Python script automates the process of deleting the geoprocessing history for all feature classes stored inside and outside feature datasets within an ArcSDE geodatabase.

There's a comment on the bottom of the article which states:

For 10.2 users, simply update the remove_gp_history_xslt from "...\Desktop10.1\..." to "...\Desktop10.2\..."

ESRI Technical Article


Modify the below parameters from the script according to the environment:

sdeconn 
remove_gp_history_xslt 
out_xml

#Import arcpy module
import arcpy, os, string

def RemoveGpHistory_fd(sdeconn,remove_gp_history_xslt,out_xml):
    arcpy.ClearWorkspaceCache_management()
    for fd in arcpy.ListDatasets():
        arcpy.env.workspace = sdeconn + os.sep + fd
        for fc in arcpy.ListFeatureClasses():

            name_xml = out_xml + os.sep + str(fc) + ".xml"
            #Process: XSLT Transformation
            arcpy.XSLTransform_conversion(sdeconn + os.sep + fd + os.sep + fc, remove_gp_history_xslt, name_xml, "")
            print "Completed xml coversion on {0} {1}".format(fd,fc)
            # Process: Metadata Importer
            arcpy.MetadataImporter_conversion(name_xml,sdeconn + os.sep + fd + os.sep + fc)
            print "Imported XML on {0}".format(fc)

def RemoveGpHistory_fc(sdeconn,remove_gp_history_xslt,out_xml):
    arcpy.ClearWorkspaceCache_management()
    arcpy.env.workspace = sdeconn
    for fx in arcpy.ListFeatureClasses():

        name_xml = out_xml + os.sep + str(fx) + ".xml"
        #Process: XSLT Transformation
        arcpy.XSLTransform_conversion(sdeconn + os.sep + fx, remove_gp_history_xslt, name_xml, "")
        print "Completed xml coversion on {0}".format(fx)
        # Process: Metadata Importer
        arcpy.MetadataImporter_conversion(name_xml,sdeconn + os.sep + fx)
        print "Imported XML on {0}".format(fx)

if __name__== "__main__":

    # Local variables:
    sdeconn = "Database Connections\\CHILD_SAFARI_SQL.sde"
    arcpy.env.workspace = sdeconn
    remove_gp_history_xslt = "C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\Metadata\\Stylesheets\\gpTools\\remove geoprocessing history.xslt"
    out_xml = "C:\\XML_out"
    os.mkdir(out_xml)
    RemoveGpHistory_fd(sdeconn,remove_gp_history_xslt,out_xml)
    RemoveGpHistory_fc(sdeconn,remove_gp_history_xslt,out_xml)
  • Do you think I can alter this script to work on gdb's not stored in ArcSDE? I don't have access to ArcSDE or Arc Server. – dwight Jan 23 '15 at 18:44
0

I recently did this too. The directory where the xml log files are typically located for v10.2 are here:

C:\Users\yourusername\AppData\Roaming\ESRI\Desktop10.2\ArcToolbox\History

You should have write access here, so you may open up a windows explorer, select the xml, and delete. A simple python script could also be written to delete these files called from a windows task scheduler. Finally, you may also set the geoprocessing history to only keep for a defined window of time (Geoprocessing menu>Geoprocessing options>Keep results younger than (drop down)).

  • I found the files and deleted, and exported the layers into a new gdb, but the geoprocessing history records remain, stubborn as ever. Thanks for your help. – dwight Jan 23 '15 at 18:43
0

Admitting that this is not a proper answer but a just note in relation to another question in stack exchange asking the opposite of this question, if you export your feature class to in_memory and then overwrite your original feature class, it will lose its geoprocessing history for good.

The problem of this approach is that it exploits a deficiency of in_memory workspace and it may not be a permanent resolution.

0

I have still not found a way in ESRI to delete the geoprocessing history. My workaround is to open the shapefile in QGIS, export it to another name and bring it back into ArcGIS. Not elegant, but simple.

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.