After loading data with the Simple Data Loader, the FC contains more rows than are displayed

Last Published: April 25, 2020


If a source feature has zero length, the Simple Data Loader (Load Data in ArcCatalog) will load it and not report an error. The feature will not display, but will show up in the attribute table.

A zero length line feature usually is a data problem.


Rather than report an error the Simple Data Loader is inserting a null shape.

Solution or Workaround

If you cannot find the features graphically, do the following to determine and select the features with null geometry:

  1. Add your feature class to ArcMap.
  2. Make it the selected layer.
  3. Run the following VBA code.

    Public Sub Select_NonNulls()

    Dim pMXd As IMxDocument
    Set pMXd = ThisDocument
    Dim pMap As IMap
    Set pMap = pMXd.FocusMap

    '-- Make sure there is a selected layer in map
    If pMXd.SelectedItem Is Nothing Then
    MsgBox "Must have a selected item in map"
    Exit Sub
    End If
    If Not TypeOf pMXd.SelectedItem Is IFeatureLayer Then
    MsgBox "The selected item must be a layer"
    Exit Sub
    End If
    Dim pDispTab As IDisplayTable
    Set pDispTab = pMXd.SelectedItem

    '-- Create an empty selectionset and open a feature cursor
    Dim pFCursor As IFeatureCursor
    Dim pSelSet As ISelectionSet
    Dim pTable As ITable
    Dim pFeatCls As IFeatureClass
    Dim pFeat As IFeature
    Set pTable = pDispTab.DisplayTable
    Set pSelSet = pTable.Select(Nothing, esriSelectionTypeHybrid, _
    esriSelectionOptionEmpty, Nothing)
    Set pFeatCls = pTable
    Set pFCursor = pFeatCls.Search(Nothing, False)

    '-- Add all features that are not null to the selection set
    Set pFeat = pFCursor.NextFeature
    Do While (Not pFeat Is Nothing)
    If Not pFeat.Shape Is Nothing Then
    If Not pFeat.Shape.IsEmpty Then
    If pFeat.HasOID Then
    pSelSet.Add pFeat.OID
    End If
    End If
    End If
    Set pFeat = pFCursor.NextFeature

    '-- Apply the selectionset to the layer
    Dim pActiveView As IActiveView
    Dim pFeatSel As IFeatureSelection
    Set pActiveView = pMap
    Set pFeatSel = pDispTab
    pActiveView.PartialRefresh esriViewGeoSelection, Nothing, Nothing
    Set pFeatSel.SelectionSet = pSelSet
    pActiveView.PartialRefresh esriViewGeoSelection, Nothing, Nothing

    End Sub

  4. Open the table document for the layer, the features with null geometry will be selected.

Article ID:000003201

  • ArcMap 8 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic