laptop and a wrench

Bug

When running large spatial selections in ArcSDE geodatabases, the Select Layer By Location geoprocessing tool returns the following error message: "Error 000520: Unexpected Topo Engine error; Failed to execute: Select By Location".

Last Published: December 18, 2015 ArcSDE/Enterprise Geodatabase
Bug ID Number NIM042999
SubmittedMarch 2, 2009
Last ModifiedApril 2, 2025
Applies toArcSDE/Enterprise Geodatabase
Version found9.3
Operating SystemRed Hat Enterprise Linux
Operating System Version4
StatusNon-Reproducible

Additional Information

Non-reproducible. If this is still being encountered in a current supported release, please contact Support Services.

Workaround

1. Export datasets to a File Geodatabase to create selections. 2. Select objects interactively. 3. Use the ArcObjects code below to complete the Select By Location operation: Public Sub SelectByLocation() On Error GoTo ErrorHandler Dim pFeatLayer As IFeatureLayer Dim pPYFeatLayer As IFeatureLayer Dim pMXDoc As IMxDocument Dim pMap As IMap Dim pSpatialFilter As ISpatialFilter Dim pFeatCursor As IFeatureCursor Dim pFeature As IFeature Dim pPYGeometry As IGeometry Dim pFeatSelection As IFeatureSelection Set pMXDoc = ThisDocument Set pMap = pMXDoc.FocusMap 'access the map layers Set pFeatLayer = pMap.Layer(0) Set pPYFeatLayer = pMap.Layer(1) 'get the py geometry Set pFeatCursor = pPYFeatLayer.Search(Nothing, False) Set pFeature = pFeatCursor.NextFeature() Set pPYGeometry = pFeature.ShapeCopy() Set pFeature = Nothing Set pFeatCursor = Nothing 'setup the spatial filter Set pSpatialFilter = New SpatialFilter Set pSpatialFilter.Geometry = pPYGeometry pSpatialFilter.GeometryField = pFeatLayer.FeatureClass.ShapeFieldName pSpatialFilter.SpatialRel = esriSpatialRelIntersects 'do the selection Set pFeatSelection = pFeatLayer pFeatSelection.SelectFeatures pSpatialFilter, esriSelectionResultNew, False pMXDoc.CurrentContentsView.Refresh 0 MsgBox "Done" Exit Sub ErrorHandler: MsgBox "Error: " & Err.Description End Sub --- The above code assumes the first map layer is the roads layer; the next is the poly layer.

Steps to Reproduce

Bug ID: NIM042999

Software:

  • ArcSDE/Enterprise Geodatabase

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options