I made a model which exports polygons to a new layer within a loop (FOR iterator: from value 1614 to 1654, by value 10). Nr. 1 is the first shapefile, Nr. 2 is the second shapefile.
I only want to export adjacent polygons from the previous layer See also the inserted picture. I believe a get count iterator is needed, in combination with a select by location tool. I played around, but can't get it to work in a model. I tried this, the model actually selects polygons which touch boundaries. But the while iterator doesn't function quite right. I get this error message (see below):
*ERROR 000539: Error running expression: EXP (count) Traceback (most recent call last): File "<expression>", line 1, in <module> NameError: name 'count' is not defined Failed to execute (Calculate Value).*
Polygon neighbors is not an option since I am working with multiple shapefiles.