Using code from http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000016p000000 trying to enable editor tracking. It works fine if there is no feature dataset in the GDB, but the moment I add a feature dataset in the GDB I get the following error:
[u'QGC_LINK', u'UDM'] Test Enabling editor tracking on QGC_LINK Line 60 Failed to execute. Parameters are not valid. ERROR 000110: QGC_LINK does not exist Failed to execute (EnableEditorTracking).
It seems that it can't find the file path.
The file structure is as follows:
Test.gdb Test.gdb/UDM Test.gdb/QGC_Link Test.gdb/FD/UDM_1
Code as follows:
import arcpy, os # Set the workspace workspace = arcpy.GetParameterAsText(0) # Set the workspace environment arcpy.env.workspace = "M:/GIS/Test.gdb/" # Get all the stand alone tables and feature classes dataList = arcpy.ListTables() + arcpy.ListFeatureClasses() print dataList # For feature datasets get all of the featureclasses # from the list and add them to the master list for dataset in arcpy.ListDatasets("", "Feature"): arcpy.env.workspace = os.path.join(workspace,dataset) dataList += arcpy.ListFeatureClasses() print dataset # Execute enable editor tracking for dataset in dataList: print 'Enabling tracking on ' + dataset arcpy.EnableEditorTracking_management(dataset, "Created", "CreatedDate", "Modified", "ModifiedDate", "ADD_FIELDS", "UTC") print 'Enabling complete'