English

Bug: Cannot build a network dataset in an ArcSDE geodatabase when its feature dataset is registered as versioned

Description

In ArcCatalog or ArcMap, building a network dataset in an ArcSDE geodatabase fails if its feature dataset is registered as versioned.

Cause

When the feature dataset is registered as versioned, all feature classes in the feature dataset, including the network dataset's system junction feature class, are registered as versioned.

The build process requires the system junction feature class to be unversioned. Since the system junction feature class is versioned, the build command fails.

Workaround

The network dataset can only be built if the system junction feature class is unversioned. The underlying data can only be edited if the entire feature dataset, including the system junction feature class, is registered as versioned.

Below are the steps to unversion the system junction feature class, build the network dataset, and re-register the system junction feature class as versioned for editing of the feature classes within the feature dataset.

  1. Select the system junction feature class in ArcCatalog.
  2. Open the ArcCatalog Visual Basic Editor and paste in the following code:

    Code:
    Sub ToggleVersioning()
    Dim pApp As IGxApplication
    Dim pGxDataset As IGxDataset
    Dim pDataset As IDataset
    Dim pVersionedObject As IVersionedObject

    Set pApp = Application

    'Get the selected feature class in ArcCatalog
    If TypeOf pApp.SelectedObject Is IGxDataset Then
    Set pGxDataset = pApp.SelectedObject
    Set pDataset = pGxDataset.Dataset
    Set pVersionedObject = pDataset
    If pVersionedObject.IsRegisteredAsVersioned Then
    pVersionedObject.RegisterAsVersioned False
    MsgBox "The selected feature class is now unregistered as versioned."
    Else
    pVersionedObject.RegisterAsVersioned True
    MsgBox "The selected feature class is now registered as versioned."
    End If
    End If
    End Sub

  3. Run the ToggleVersioning macro to unversion the system junction feature class.
  4. Build the network dataset.
  5. Select the system junction feature class in ArcCatalog.
  6. Run the ToggleVersioning macro to re-version the system junction feature class.

    Note:
    The system junction feature class must be registered as versioned in order to make edits to any feature class in this feature dataset.