Polygon Fill Tool


The Polygon Fill Tool is designed to create a new polygon feature in the target layer based on the tracing of edges in an enclosed area (enclosed by edges in the active topology). In other words, fill an enclosed area with a new polygon feature.

The tool needs a single edge selected to begin the trace and an indication as to which side of the edge is to be filled (traced). Selection of the edge and the indication of the right or left of the edge is done by dragging a box out on the screen. The first location you click at indicates the side of the edge to fill, the second click creates the box that is used to select the edge to begin the trace with. Only one edge can be selected with the box you create.

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 Polygon Fill Tool from the 'Developer Samples' category, and drag it on to a toolbar. Dismiss the Customize dialog.
  3. Begin editing and set the target layer to be a polygon layer.
  4. Zoom to an area you want to fill (create a new polygon in). The Extent needs to include the entire enclosed area to be filled.
  5. Activate the Polygon Fill Tool and drag out a box on the screen that will select a single edge in the active topology to begin the trace from. The first click in creating the box defines which side of the edge will be filled.


Requires: Editable topology data

Minimum ArcGIS Version Required: 8.3

Difficulty: Advanced

Visual Basic
File Description
frmResources.frm Holds the bitmap for the Polygon Fill Tool.
PolygonFillTool.cls Class containing the code for the Polygon Fill Tool.
PolygonFillToolPrj.vbp The project file for the Polygon Fill Tool.

Key CoClasses: TopologyEdge, TopologyGraph, TopologyNode
Key Interfaces: IEnumNodeEdge, ITopologyEdge, ITopologyGraph, ITopologyNode
Key Members: IEnumNodeEdge::Next, ITopologyEdge::FromNode, ITopologyEdge::ToNode, ITopologyGraph::EdgeSelection, ITopologyGraph::Select, ITopologyNode::Edges