Last Modified:07/30/2002

This sample calculates the spatial index gridsize for a featureclass to be loaded to a geodatabase. It uses the same algorithm to calculate gridsize as the geodatabase loaders in ArcToolbox and ArcCatalog.. If the "Projecting on Load" check box is checked a spatial reference dialog box will be displayed allowing the entry of the projection of the target featureclass or featuredataset. The resulting grid size can then be used in the load or in the definition of the featureclass/featuredataset.

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

Standalone sample

Difficulty: Intermediate

Visual Basic
File Description
frmGridSize.frm VB form for the main user interface
GridSize.vbp Visual Basic project file

Key CoClasses: FeatureClass, FeatureClassName, GxDialog
Key Interfaces: IFeatureClass, IFeatureClassName, IGeoDataset, IGxDisplay, IGxObjectFilter, IGxObject, ISpatialReferenceDialog, ISpatialReference, IQueryFilter
Key Members: IGxDialog::DoModalOpen, IGxDialog::Title, IGxDialog::ButtonCaption, IGxDialog::AllowMultiSelect, IGxDialog::ObjectFilter, IFeatureClass::ShapeType, IFeatureClass::FeatureCount, IFeatureClassName::Open, IGeoDataset::Extent, ISpatialReferenceDialog::DoModalCreate, IQueryFilter::OutputSpatialReference