Merge features and respect merge rules



Description:

Attributes of a feature class in a geodatabase can have domains associated with them. One property of domains are merge rules. When using the Merge command in ArcMap, these merge rules are not used to determine the attribute values of a new feature created when merging two or more features together. This example demonstrates how implementing the ICommand interface allows you to merge features and use their merge rules to determine the resulting feature's attribute values.
Products:
ArcEditor: VB6

Platforms: Windows

Minimum ArcGIS Release: 9.0

How to use:
[VB6]
  1. View the source code to see how the component was implemented.
  2. In ArcMap, browse and select the MergeRules.dll using the 'Add From File' button on the Customize dialog.
  3. From the 'Developer Samples' commands category, add 'Merge features' to the Editor toolbar.
  4. Start an edit session with at least one polyline or polygon feature class loaded into the map which has merge rules associated with some or all of its attributes.
  5. Select some features in the feature class and click the 'Merge features' command.

Download the VB6 files
MergeRules.vbp Visual Basic project that implements this sample.
clsMergeRules.cls VB class file containing the ICommand implementation.
MergeRules.dll The compiled project.

Download the files for all languages



Key Libraries: Geodatabase, Geometry, Carto, Editor
Key CoClasses:DimensionShape
Key Interfaces: ICommand, IFeatureClass, IRowSubtypes, IDomain