Delete Feature Fix


The Delete Feature fix is an example of a custom fix for a topology error. The fix was designed to be applied to Must Not Have Dangles errors. When registered in the proper category (ESRI Line Dangle Error Commands), the fix will appear when you right click on an error of the correct type. When the fix is selected, the feature with the dangle will be deleted. The command combines the Select Features and Delete steps into one button click.

Be careful when using this command as a bulk fix as it will delete all dangles regardless of whether they cross other lines or not. The proper procedure would be to run Planarize on the set of lines first to make sure all intersections are created, then Validate and fix remaining errors with the Delete Feature fix.

How to use:
  1. Register the DeleteFeatureFixPrj.dll file on your machine using regsvr32.
  2. Using Categories.exe, add the DeleteFeatureFix class to the ESRI Line Dangle Error Commands category. See the Developers help for more information on Categories.exe if necessary.
  3. Start ArcMap and add your topology data to the map.
  4. Use the Error Inspector to display your topology errors. When you have an error from the Must Not Have Dangles line rule, right click on it and select the Delete Features Fix option.


Requires: Editable topology data

Minimum ArcGIS Version Required: 8.3

Difficulty: Intermediate

Visual Basic
File Description
DeleteFeatureFix.cls Class containing the code for the Delete Feature fix.
DeleteFeatureFixPrj.vbp The project file for the Delete feature fix.

Key CoClasses: TopologyErrorFeature, TopologyExtension
Key Interfaces: ITopologyErrorFeature, ITopologyExtension
Key Members: ITopologyExtension::ActiveErrorCount, ITopologyExtension::ActiveError, ITopologyErrorFeature::TopologyRuleType, ITopologyErrorFeature::OriginClassID, ITopologyErrorFeature::OriginOID