HOW TO

Count the vertices for line or polygon features in ArcMap

Last Published: January 31, 2024

Summary

Note:
The procedure below is for ArcGIS 9.3.1 or earlier versions. Starting at ArcGIS 10.0, expressions in the Calculator are created using only VBScript or a standard Python format. See Count the vertices for line or polygon features in ArcMap 10.

In Workstation ArcInfo, the COUNTVERTICES command can be used to write the number of vertices for a line or polygon feature to the attribute table. Instructions provided describe how to do the same in ArcMap.

Procedure

  1. Right-click the layer and select Open Attribute Table.
  2. Click Options > Add Field to add a new field to the layer.
  3. Name the field NumPoints and select Long Integer for the type.
  4. Right-click the new field and select Field Calculator.
  5. Check the Advanced box.
  6. Copy the following text into the Pre-logic VBA Script Code text box:
Dim pPointCount As IPointCollection 
Set pPointCount = [SHAPE]
  1. Type the following text into the lower text box.
pPointCount.PointCount 

[O-Image]

  1. Click OK.

Article ID:000004889

Software:
  • ArcMap 9 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic