HOW TO
This is a workflow for running the Verify and Repair Connectivity tool with the exhaustive check option in a Python script.
Note:
Please be aware that this process is very resource intensive and an exhaustive check of the geometric network at full extent can take hours. It is therefore recommended to run this overnight or on a weekend.
Note:
Using the fishnet decreases the load for this process because the script is run block-by-block rather than for the whole network all at once. One log file is created for each block in the fishnet.
Code:
import arcpy
grid = r'Database Connections\Connection to GIS_DB.sde\GIS_DB.SDE.Fishnet'
net = r'Database Connections\Connection to GIS_DB.sde\GIS_DB.SDE.NetworkFeatures\GIS_DB.SDE.Water_Net'
rows = arcpy.da.SearchCursor(grid,["OID@","SHAPE@"])
for row in rows:
try:
ext = row[1].extent
logfile = r"C:\TEMP\Water_Fishnet_Test_{0}.txt".format(str(row[0]))
arcpy.VerifyAndRepairGeometricNetworkConnectivity_management(net, logfile, "VERIFY_AND_REPAIR", "EXHAUSTIVE_CHECK", ext)
print str(row[0]) + " done"
except:
print str(row[0]) + " failed"
Get help from ArcGIS experts
Download the Esri Support App