I have seen many questions related to this problem but very few answers. I am very new to scripting and using ModelBuilder, but I am trying to calculate the cost path for 200 polygons with a single source and a single destination for each polygon.

So far, I have successfully calculated the Cost Distance and Backlink for all these polygons and their respective source, but now I would like to select the right destination, cost distance and backlink to calculate the cost path for each polygon.

All three inputs needed for Cost Path should therefore have the same number incorporated in their name related to the polygon they belong to (eg: Desti_001, CostDis_001, Backl_001) and use these three inputs to calculate cost path.

My questions are:

  • how do I select these three inputs based on the number is their names?
  • how do I create a loop to calculate the cost path of all polygons?

I use ArcGIS 10.1

  • Do you want to use ModelBuilder specifically, or are you open to an ArcPy solution? – Erica Sep 8 '14 at 12:42
  • As per the Tour there should be only one question asked per question, but also what questions and what answers related to your problem have you already reviewed? – PolyGeo Oct 31 '16 at 4:06