PipeValidation Class Extension



Description:

This sample provides a custom validation of attributes, such that for any feature with a length greater than 10 meters, the valid values for MATERIAL are 'Coated Steel' or 'PVC'.

For a full discussion of the sample, see the Extending ArcObjects topic PipeValidation Class Extension Example.

Products:
ArcEditor: VB6, VC++

Platforms: Windows

Minimum ArcGIS Release: 9.0

How to use:
[VB]
  1. Register PipeValidationVB.dll, and double-click the PipeValidationVB.reg file to register to component categories.
  2. Open ArcMap and add the PipesVB feature class. You will find this feature class in the ExtendingAO personal geodatabase, which is in the SamplesCOM/Data/ExtendingArcObjects folder of the ArcGIS Developer Kit. This feature class has been preconfigured with the example's class extension.
  3. Start editing, and select all features in the class. Click the Editor menu and click Validate Features. Two features should be invalid. Select each feature individually and click Validate Features again. The reason for invalidity will be shown.
[VC++]
  1. Open and build the solution to register the DLL and register to component categories.
  2. Open ArcMap and add the PipesVCpp feature class. You will find this feature class in the ExtendingAO personal geodatabase, which is in the SamplesCOM/Data/ExtendingArcObjects folder of the ArcGIS Developer Kit. This feature class has been preconfigured with the example's class extension.
  3. Start editing, and select all features in the class. Click the Editor menu and click Validate Features. Two features should be invalid. Select each feature individually and click Validate Features again. The reason for invalidity will be shown.

Download the VB6 files
PipeClassExtension.cls Class module that implements the class extension.
PipeValidationVB.dll The compiled component.
PipeValidationVB.reg Registry export file containing script to register the extension class to the component category.
PipeValidationVB.vbp Visual Basic project file.
Download the Visual C++ files
PipeClassExtension.cpp Implementation of the class extension.
PipeClassExtension.h Header file for the class extension.
PipeValidation.idl Interface Definition Language file.
StdAfx.h Standard precompiled header file that imports the ArcGIS object libraries.

Download the files for all languages



Key Libraries: GeoDatabase
Key Interfaces: IClassExtension, IObjectClassExtension, IObjectClassValidation