Is This Content Helpful?
We're glad to know this article was helpful.
How can we make this better?
The following script selects overlapping features in a polygon theme.
'-- Script: OverlapPoly.ave
'-- This script selects all polygons in a theme that
'-- overlap any other polygons in that same theme.
theView = av.getactivedoc
theTheme = theView.Getactivethemes.get(0)
theFTab = theTheme.GetFTab
numRecs = theFTab.GetNumRecords
shapefld = theFTab.FindField("Shape")
for each rec in theFTab
av.SetStatus((rec/numRecs) * 100)
aPoly = theFTab.ReturnValue(shapefld, rec)
for each rec2 in theFTab
if (rec < rec2) '-- eliminates double-checking
otherPoly = theFTab.ReturnValue(shapefld, rec2)
theArea = otherPoly.ReturnIntersection(aPoly).ReturnArea
if (theArea > 0) '-- ignores polygons that merely touch
'-- End of Script: OverlapPoly.ave