Skip to main content
Solved

Delete all feature classes and write a new FGDB

  • November 29, 2024
  • 2 replies
  • 92 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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+62
  • 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