ERROR
Executing the Rebuild Connectivity tool with ArcGIS for Desktop results in the following error:
"Cannot rebuild network connectivity. A network feature has a network element whose id is larger than the maximum eid value in the PROPS table."
Using the Rebuild Connectivity tool returns the error message when there is a geometric network that contains features and their corresponding network elements in an inconsistent state.
Additional symptoms may be encountered when performing a trace operation or editing the features that are inconsistent.
The underlying software cause of this error, getting the Geometric Network into an inconsistent state, has been tracked back to two access patterns:
1. The first access pattern is using Python as a headless application, which starts and stops edit sessions manually.
Code:
edit.startEditing(False, True)
edit.startOperation()
arcpy.Append_management(inputFC, targetFC)
edit.stopOperation()
edit.stopEditing(True)
Code:
IWorkspace sdeWorkspace = sdeWorkspaceFactory.Open(connectionPropertySet, 0);
IFeatureClass featureClass = ((IFeatureWorkspace)sdeWorkspace).OpenFeatureClass("testClass");
IWorkspaceEdit wksEdit = (IWorkspaceEdit)sdeWorkspace;
wksEdit.StartEditing(true);
wksEdit.StartEditOperation();
//Create a new feature
IFeature feature = featureClass.CreateFeature();
feature.Shape = new Point { X = 2212251.70, Y = 398125.168 };
feature.Store();
//De-reference the feature class, and feature which were edited, prior to calling StopEditing()
while (Marshal.ReleaseComObject(feature) > 0) { };
while (Marshal.ReleaseComObject(featureClass) > 0) { };
wksEdit.StopEditOperation();
wksEdit.StopEditing(true);
Get help from ArcGIS experts
Download the Esri Support App