Shape To Geodatabase with Rejects

Created:01/21/2002
Description:

This sample converts a shapefile to a Geodatabase and provides a rejects shapefile where needed. Conversion status is shown in a progress bar. The sample duplicates import functionality available in ArcCatalog and ArcToolBox, except this standalone Visual Basic application allows the user the save any rejected features to a shapefile ("sourcename"_rejects). In addition the error message for each rejected feature can be saved to a text file (rejects.txt). The sample only supports the loading of shapefiles into a Geodatabase (SDE).

For output to ArcSDE geodatabases, the sample calculates an appropriate grid size rather than asking the user.


How to use:
  1. Load the project into Visual Basic and run.

Application:
Standalone sample

Difficulty: Intermediate


Visual Basic
File Description
Shp2GDBRejects.vbp Visual Basic project file
Shp2GDBRejects.frm VB form for the main user interface
Shp2GDBRejects.bas BAS mod containing dataloading functions


Key CoClasses: FeatureDataConverter, FieldChecker, FieldError, InvalidObjectInfo, GeometryDef
Key Interfaces: IFeatureDataConverter, IFeatureProgress, IFieldChecker, IFieldError, IInvalidObjectInfo, IGeometryDefEdit
Key Members: IFeatureDataConverter::ConvertFeatureClass, IFeatureDataConverter::ConvertTable