Skip to main content
Solved

Delete all feature classes and write a new FGDB

  • November 29, 2024
  • 2 replies
  • 61 views

bjudes
Enthusiast
Forum|alt.badge.img+10

Hi,

I have a fgdb, I want to drop all existing features classes within the fgdb and write in a new one. Is this possible?

Thanks

B

Best answer by nielsgerrits

I wonder why you want to do this instead of overwriting the file geodatabase?

But if you have features for all featureclasses, you can simply set the FeatureWriter to Drop and Create. But if you have featureclass “A” and no features for featureclass “A” it will not touch that one.

I would use a PythonCaller to drop all featureclasses in the gdb. Even I can do this nowadays using the AI Assist in the PythonCaller. Just ask for “Drop all featureclasses in a file geodatabase.”

If you do not have ESRI software and can not run ArcPy, an alternative is to generate a dummy feature for each featureclass you have no features for.

View original
Did this help you find an answer to your question?

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • November 29, 2024

I wonder why you want to do this instead of overwriting the file geodatabase?

But if you have features for all featureclasses, you can simply set the FeatureWriter to Drop and Create. But if you have featureclass “A” and no features for featureclass “A” it will not touch that one.

I would use a PythonCaller to drop all featureclasses in the gdb. Even I can do this nowadays using the AI Assist in the PythonCaller. Just ask for “Drop all featureclasses in a file geodatabase.”

If you do not have ESRI software and can not run ArcPy, an alternative is to generate a dummy feature for each featureclass you have no features for.


bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • November 29, 2024

Ah okay, I was not aware that I could simply overwrite the existing fgdb. Thanks for your input, I am running this now. 

 

Thanks

B


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings