I am creating a tool that will automate a tedious process of data standardization. One of the steps is to recalculate the feature extent of a SDE file. Surprisingly I cannot find anything useful in regards to recalculating feature extent, except for a VBA script here: Recalculating full extent of File Geodatabase feature class? and a tool here: http://www.arcgis.com/home/item.html?id=576ebff497094274bdd7c76e456de6c3. Unfortunately I don't know VBA well enough to understand fully what is going on or how to incorporate it into my existing Python script, nor do I know how to call an add-in. Also I will not be the only one using this tool and I'd rather avoid making everyone who uses the tool download the add-in. I've heard about reboxing but it doesn't seem like it's used anymore. Does anyone have any ideas on what I could do or how to use the VBA script in my Python script?
[GIS] Pythonic way to recalculate feature extent in ArcGIS 10.2
arcgis-desktoparcpyenterprise-geodatabaseextents
Best Answer
Like in the comment of PolyGeo, Compacting database recalculates feature class extent, so here is an arcpy script to automate this task and also to make rebuild index and analyze:
Geodatabase compression requires disconnecting all the users because
When the Compress tool is executed, the geodatabase is unavailable until compression is completed