0

I use a tool (Centrality of Urban Network Analysis) that requires two input files: a polygon layer made of buildings and a Network Dataset. Since my area of analysis is quite huge I divided it into 40 parts. I put all the polygon layers in a folder and all the ND into another.

I want to iterate the process with this tool but problem is, in ModelBuilder, we can only use one iterator, Iterate Features Classes in my case. Since we cannot use two iterators in ModelBuilder, I wonder how it is possible to iterate a process when someone is using a tool that requires two different inputs.

  • 2
    Look at the help file about embedding models, this is how you can loop within a loop. – Hornbydd Dec 15 '17 at 10:09
  • Can you give an example of polygon dataset name and the corresponding ND name? – fatih_dur Dec 15 '17 at 13:43
1

You have a some options here.

Option 1: Put a submodel in your main model. Within that submodel, place another iterator. That's how you can get around the "One Iterator per model" rule.

Option 2: make sure the ND files are named the same way as the polygons, then use Calculate Value with a script in it that'll change the file extension appropriately, thus giving you the name of the ND file you need. Then use that as normal.

Option 3: Include a border lines layer in the inputs. Then, inside the iterator create a layer selection (intersects with the current polygon layer). Then clip your original ND so that you're only using the relevant parts.

1

You can just export your model into a Python script and then do all the powerful magic with Python! Model Builder is too limited, even not able to do if-else flow control. But MB can help you quickly get the stub of an equivalent Python script that you can modify to suit your needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.