AnsweredAssumed Answered

For loop with Closest Facility

Question asked by BMariska on Apr 5, 2017
Latest reply on May 17, 2017 by cmwrenn3

Hi I'm new to Python and trying to write a script to make my life easier.  I'm hoping to write a code that will allow me to import a shapefile of 10,000 points into "Incidents" and then another another shapefile of 600 points into "Facilities".  What I want to get is the distance from each of those 10,000 points to each of the 600 "Facilities" so basically run 600 different Closest Facility and print the Distance from each point into a table. Do I have to split that shapefile into 600 separate shapefiles or is it possible to loop through them without that?  Like I said I'm very new to Python so any input on the syntax would be much appreciated! Let me know what you guys are thinking.


python help closest facility networkanalyst