soevorov

VBA-script buffer user interrupt

Discussion created by soevorov on Oct 2, 2010
Latest reply on Oct 2, 2010 by soevorov
Hi,

I've created a small vba-script to find out if there are any polygons that are smaller than 10m wide or are partly less wide than 10m. I've copied this script in the ArcGIS field calculator, but after processing around 9800 polygons the script crashes (user interrupt). I'm not sure what went wrong. Any pointers would be appreciated.

Kind regards,
Marcel

Dim Output as String
Dim AantalParts as Integer
Dim pTopoOp As ITopologicalOperator3
Dim pPoly As IPolygon

Set pTopoOp = [shape]
Set pPoly = pTopoOp.Buffer(-5)

AantalParts = pPoly.ExteriorRingCount

If AantalParts = 1 then
   Output = "0-OK"
elseif AantalParts = 0 then
   Output = "1-VolledigSmaller"
else
   Output = "2-ErgensSmaller"
endif

Outcomes