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:
Does anyone know of a tool that I can run with an iterator to run over each of my feature classes???
Solved! Go to Solution.
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:
succeeded = True
# disconnect users
And it would accomplish the same thing without the "infinite loop" and "break"