I have one gdb with lots of layer (~500) and to receive empty gdb I delete all records from layers. I Use deleterows / TruncateTable but for one layers take about 1-3 minutes.
Is there a faster way to get an empty gdb without records using python?
I have one gdb with lots of layer (~500) and to receive empty gdb I delete all records from layers. I Use deleterows / TruncateTable but for one layers take about 1-3 minutes.
Is there a faster way to get an empty gdb without records using python?
Not sure exactly what you mean - but if you want all empty but identical classes in a new gdb, there's the 'Import XML Workspace Document', if you have preprocessed an 'Export XML Workspace Document'.
From: Import XML Workspace Document (Data Management) Desktop » Geoprocessing » Tool reference » Data Management toolbox http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000014s000000
arcpy.ImportXMLWorkspaceDocument_management("C:/Data/Target.gdb", "C:/Data/StJohnsData.xml", "SCHEMA_ONLY", "DEFAULTS")
...or, if had a gdb copy or replica in it's original 'empty state', could overwrite with a new empty one.