>>> arcpy.env.cellSize u'MAXOF' >>> arcpy.SetLogHistory Traceback (most recent call last): File "<interactive input>", line 1, in <module> AttributeError: 'module' object has no attribute 'SetLogHistory' >>> arcpy.env.SetLogHistory Traceback (most recent call last): File "<interactive input>", line 1, in <module> AttributeError: 'GPEnvironment' object has no attribute 'SetLogHistory' >>> arcpy.env.iHateArcPy Traceback (most recent call last): File "<interactive input>", line 1, in <module> AttributeError: 'GPEnvironment' object has no attribute 'iHateArcPy' >>> arcpy.env.iHateArcPy = True >>> print arcpy.env.iHateArcPy True
arcpy.logHistory = False
import arcpy arcpy.gp.loghistory = False #turn it off
arcpy.gp.logHistory = False
arcpy.gp.loghistory = False
Is there any way to delete geoprocessing history from the metadata in ArcGIS 10. There was a script for 9.3.x that did this, but I'm a little reluctant to use it in 10, because of the changes in Metadata from 9 to 10
Your post was from quite some time ago, but I am finding that the SetLogHistory (false) is working as expected in arcpy. I am not finding any additional XML inserted into my GDB_ITEMS documentation column for the workspace after executing a compress after arcpy.SetLogHistory(False). Let Support Services know if you are encountering this as an issue.
>>> arcpy.SetLogHistory(False)
>>> arcpy.Compress_management(r'Database Connections\sqlserver - blakley - 10.3.sde')
<Result 'Database Connections\\sqlserver - blakley - 10.3.sde'>
>>>
This is quite a necro, apologies.
However I'm finding that none of these flags work to not write geoprocessing history to the metadata. It is successful that there are no xml files being generated at least. But the biggest issue is GP history in metadata which slows down GP tools (personal experience, what took 15 seconds jumped to 15 minutes and back to 15 seconds after I cleared the history).
Specs:
ArcMap 10.6.1/Pro 2.3.3.
This is all on SDE and I'm running my scripts externally not in ArcMap or Pro.
It's ridiculous that there is an official ESRI function to turn it off but it doesn't work.
https://desktop.arcgis.com/en/arcmap/10.6/analyze/arcpy-functions/setloghistory.htm
https://pro.arcgis.com/en/pro-app/arcpy/functions/setloghistory.htm
Greetings,
ESRI technical support logged BUG-000128506 regarding SetLogHistory function not functioning properly. I have this same issue. In my case and verified by tech support SetLogHistory is functioning as expected when the code is executed from within Pro from a python prompt. SetLogHistory is also functioning as expected if the code is tied to a toolbox tool.
Python 3.6.x
ArcGIS Pro 2.4.3
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.