English

How To: find the number of vertices in an arc.

Procedure

How can the number of vertices in an arc be counted?

Answer:

There are two methods to accomplish this:

1) Use the ARC COUNTVERTICES command. This adds an item to the attribute table of a coverage that lists the number of vertices for each arc. To set a
variable to the number of vertices in each arc, loop through each record and use the AML [SHOW] function to set each variable. To set a variable to the total number of vertices in the coverage, run STATISTICS on the coverage then use the AML [SHOW STATISTIC] function to extract the total number of vertices in the coverage.

2) Write an AML to loop through selected records in the coverage and run it in ARCEDIT. The following aml will set a variable to the number of vertices in a
selected arc:

EDITFEATURE ARC
SELECT ALL
&SETVAR a = [SHOW SELECT 1]
&SETVAR b = [SHOW ARC %a% NPNTS]