Select to view content in your preferred language

Two iterators in modelbuilder

19125
14
08-15-2012 11:18 PM
AndreasNielsen
Deactivated User
Hi.
I am working on a project were I need to combine several files. It can be illustrated like this:
I need to open File_1 and do a calculation within Mask_A. Then File_2 within Mask_B and so forth. Both the files and masks are stored in separate folders. Is this possible to do in ModelBuilder? I guess I have to use Python, so maybe one of you have an input to that?
It is easy to do in ModelBuilder if I want to use the same mask for all Files, but not if I want to change mask for each file.
Thanks in advance
0 Kudos
14 Replies
ShitijMehta
Esri Regular Contributor
Hi Andreas123.
Check the image attached.
Try something like that.
Read Lists
0 Kudos
宇恩楊
New Contributor

I met the same question.Here is my solution:

You could put only one iterate function  in Model , but you could get .shp(s) form different folders.

"P"  means set the address as a Model Parameter.

In my case :

First, create three  parameter as the folder address.

Second, execute the Iterate and functions.

Finally, set the out put folder. e.g. %Output_Folder%\%Name%.shp  

chose data from different folder

run the Model

0 Kudos
AhmedAlshurafa
New Contributor

Hi 宇恩 楊

 

Can you elaborate more about how you managed to use two different folders as an inputs to the model ?

 

Thank you @宇恩 楊

0 Kudos
AnnaKreij
Occasional Contributor

I also have this challenge and am really struggling to find a solution. Can you please elaborate on this?

0 Kudos
AhmedAlshurafa
New Contributor

Hi 宇恩 楊

Can you elaborate more about how you managed to use two different folders as an inputs to the model ?

Thank you

0 Kudos