Select to view content in your preferred language

Delete Feature Class if no Geometry Exists

4637
12
05-29-2012 01:29 PM
StuartBlumberg
Emerging Contributor
Hi,

I have a model using ModelBuilder that extracts data from an SDE database into a new personal geodatabase that the user creates.  I don't want to include any feature classes that have no geometry.  Is there a way to check all feature classes for geometry and delete the ones without using ModelBuilder?  The tool also extracts tables from spatial features from the SDE, is there a way to check if data exists in these tables and if not then delete them?  I am using ArcGIS 9.3.1.  Thank you.
0 Kudos
12 Replies
StuartBlumberg
Emerging Contributor
I may be a bit slow when it comes to programming, where do I need to apply this code?  Do I need to a create a python script?  Can I put this into model builder?  How could I set it up to delete all empty feature classes in a geodatabase?  Thanks so much for your help and patience.
0 Kudos
MathewCoyle
Honored Contributor
In the link I posted there is an example of it being used in a model work flow. You can use the same methodology to delete them by using the delete tool.
0 Kudos
StuartBlumberg
Emerging Contributor
Great!  That did the trick, thank you so much!
0 Kudos