Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 abaut 1-3 minuts.

Is better way (faster) to get a empty gdb without records usnig python?

share|improve this question
Is your problem on how to delete all features from an existing gdb or to create an empty gdb? – R.K. Dec 9 '12 at 17:58
up vote 1 down vote accepted

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

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.