BUG

Copy\Paste or Data Extract of a geometric network with invalid connectivity rules may cause the application to crash

Last Published: April 25, 2020

Description

A geometric network with invalid connectivity rules may experience an application crash during one of the following operations:
- Copy\Paste within ArcCatalog.
- When using the Data Extract command on the Distributed Geodatabase toolbar.
- The creation of a Replica or Check-Out.

Cause

Within a geometric network, invalid connectivity rules are those rules that meet the following criteria:
- For an edge-edge rule, no default junction is specified.
- For an edge-junction rule, no default junction is specified.
- For an edge-edge rule, no junctions are specified.

In order to determine whether the geometric network has invalid connectivity rules, use the following Visual Basic for Applications (VBA) code sample.

To use this code sample:
- Copy the sample into the ThisDocument module within VBA for ArcCatalog.
- Select the geometric network to analyze.
- Run the macro.
- If invalid connectivity rules are found, they are listed when the macro finishes running. The invalid rules are also displayed in the Debug output window in VBA.

Code:
Sub FindInvalidConnRules()
Dim pApp As IGxApplication
Dim pGxObj As IGxObject
Dim pDataset As IDataset
Dim pGN As IGeometricNetwork
Dim pFCC As IFeatureClassContainer
Dim pName As IName
Dim pEnumRule As IEnumRule
Dim pRule As IRule
Dim pEdgeConnRule As IEdgeConnectivityRule
Dim pSubtypes As IRowSubtypes
Dim strConnRules As String
Dim k As Long
Set pApp = Application
Set pGxObj = pApp.SelectedObject
Set pName = pGxObj.InternalObjectName
Set pGN = pName.Open
Set pFCC = pGN
Set pEnumRule = pGN.Rules

k = 0

Set pRule = pEnumRule.Next

Do Until pRule Is Nothing
If pRule.Type = esriRTEdgeConnectivity Or pRule.Type = esriRTJunctionConnectivity Then
If pRule.Type = esriRTEdgeConnectivity Then
Set pEdgeConnRule = pRule
If pEdgeConnRule.DefaultJunctionClassID = -1 Then
Debug.Print pFCC.ClassByID(pEdgeConnRule.FromEdgeClassID).AliasName & ":" & pEdgeConnRule.FromEdgeSubtypeCode, pFCC.ClassByID(pEdgeConnRule.ToEdgeClassID).AliasName & ":" & pEdgeConnRule.ToEdgeSubtypeCode, pEdgeConnRule.JunctionCount, pEdgeConnRule.DefaultJunctionClassID
strConnRules = strConnRules & pFCC.ClassByID(pEdgeConnRule.FromEdgeClassID).AliasName & ":" & pEdgeConnRule.FromEdgeSubtypeCode & ", " & pFCC.ClassByID(pEdgeConnRule.ToEdgeClassID).AliasName & ":" & pEdgeConnRule.ToEdgeSubtypeCode & vbCrLf
k = k + 1
End If
End If
End If
Set pRule = pEnumRule.Next
Loop
If k = 0 Then
MsgBox "No invalid connectivity found", vbOKOnly, "Invalid connectivity rules"
Else
MsgBox "Feature Class:Subtype, Feature Class:Subtype" & vbCrLf & vbCrLf & strConnRules, vbOKOnly, "Invalid connectivity rules"
End If

End Sub

Workaround

If there are invalid connectivity rules within the geometric network, take the following steps to correct them.

  • If there are invalid edge-edge connectivity rules, assign a default junction to the edge rule. Follow steps 7-9 in the "Adding an edge-edge rule in ArcCatalog" section of the Desktop Help for Geometric Network Connectivity Rules.

    Geometric Network connectivity rules
  • If there are invalid edge-junction connectivity rules, assign a default junction to the edge-junction rule. Follow steps 7-10 in the "Adding an edge-junction rule" section of the Desktop Help for Geometric Network Connectivity Rules.

    Geometric Network connectivity rules

    Note:
    The issue has also been corrected with ArcGIS 9.2 Service Pack 5. The presence of invalid connectivity no longer causes the application to crash, during any of the above mentioned operations.

Article ID:000009886

Software:
  • ArcMap 8 x
  • ArcMap 9 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options