I have two feature class files, point file and polyline file and would like to spatially join pairs by looping/iterating based on a conditional IF statement. The resulting pairs would then be loaded into the ArcMap spatial join tool (v 10.2.2). Below is my attempt to block out the logic.
IF Point File Field State Code AND Polyline File Field State Code = X
THEN Create a temporary subset feature class for each (point and line file) and then load into the ArcMap spatial join tool (Target feature points Join features Lines)
OUTPUT FEATURES CLASS to a new feature class with the spatial join (that allow all subsets to be inserted).
LOOP (ITERATE) For the next State Code value until all codes have been matched and the all spatial joins of the subsets are completed.
The idea is to not have to load 50 pairs of point and lines files to complete a spatial join. Spatially joining the whole US set of points and lines at once takes a very large run time. In essence you’ re giving ArcMap a much smaller task at a time only having to spatially join a state of point to a state of lines at a time.