Select to view content in your preferred language

Is there a tool to Recalculate Feature Extents

11590
15
Jump to solution
01-12-2016 09:54 PM
BenVan_Kesteren1
Deactivated User

Hi,

I have hundreds of feature datasets that have incorrect XY entents (unknown reason as to why), but I am hoping to save time by automating the pressing of the 'Recalculate' button as seen below:

2016-01-13 165116 Feature Class Properties .jpg

Does anyone know of a tool that I can run with an iterator to run over each of my feature classes???

Thanks

15 Replies
JasonTipton
Frequent Contributor

That's that infinite loop I was talking about. The tool seems to error out a lot. So I loop until it doesn't which is mostly the 1st time, but often it has to loop back a 2nd. It could be from some process trying to make a connection to the database.

The "break" after the recalculate extent will break the loop on a successful run and move on to the next feature class. Otherwise, it will disconnect all connected users and loop back around to try again.

I could have created a boolean something like...

for feature in dataList:
     succeeded = False
     while succeeded == False:
         try:
              # recalculate
              succeeded = True
         except:
              # disconnect users

And it would accomplish the same thing without the "infinite loop" and "break"

NanaDei
Esri Contributor

Hi Ben,

Are the feature classes residing in a file geodatabase or an enterprise geodatabase?

Thanks

0 Kudos
BenVan_Kesteren1
Deactivated User

Everything resides in Enterprise GeoDB

Cheers

0 Kudos
MelissaJarman
Esri Contributor

There is a new geoprocessing tool at 10.4 'Recalculate Feature Class Extent'

Note this tool requires an exclusive lock for it to successfully execute.

0 Kudos
XanderBakker
Esri Esteemed Contributor

This was already mentioned by Jason Tipton  in this thread...

0 Kudos
MikeCusi
Frequent Contributor

You can also use modelbuilder to iterate through all the FC's in the FGDB that is then passed on to Recalculate FeatureClassExtent.

0 Kudos