DetermineAdjacent Command

Created:9/20/2002
Description:

The purpose of the DetermineAdjacent command is to calculate attributes values on a line layer based on the Object IDs of polygons to the left and right. The command will calculate the same information the LPOLY and RPOLY fields in a coverage maintained. The advantage of geodatabase topology is that you could calculate this information for different sets of polygons.

How to use:
  1. In the Customize dialog, click on 'Add from file' and select this sample's dll.
  2. Under the Commands tab of the Customize dialog, select the DetermineAdjacent Command from the 'Developer Samples' category, and drag it on to a toolbar. Dismiss the Customize dialog.
  3. Begin editing.
  4. Click on the DetermineAdjacent Command to bring up the dialog. Specify the line layer to update and the fields within that layer that will hold the left and right values. Specify the polygon layer to search against for the left and right values.
  5. Click on the OK button to execute the command.

Application:
ArcMap

Requires: Editable line and polygon data

Minimum ArcGIS Version Required: 8.3

Difficulty: Advanced


Visual Basic
File Description
DetermineAdjacent.cls Class containing the code for the DetermineAdjacent Command.
frmDetermineAdj.frm Form for specifying the line and polygon layers to use.
DetermineAdjPrj.vbp The project file for the DetermineAdjacent Command.


Key CoClasses: FeatureClass, SelectionSet, TopologyEdge, TopologyGraph
Key Interfaces: IEnumTopologyParent, IFeatureClass, ISelectionSet2, ITopologyEdge, ITopologyGraph
Key Members: IEnumTopologyParent::Next, IFeatureClass::Update, ISelectionSet2::Update, ITopologyEdge::LeftParents, ITopologyEdge::Parents, ITopologyEdge::RightParents, ITopologyGraph::Build, ITopologyGraph::GetParentEdges