Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

1 Answer 1

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 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.

share|improve this answer

Your Answer

 
discard

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.