Sub-model cannot iterate features with same name ?

611
2
Jump to solution
04-29-2020 03:17 AM
JonathanCarruthers-Jones
New Contributor II

I have setup a nested model to run through folders of shapefiles for different feature classes.

There are over a hundred of these folders one for each department of France. Each of these folders has sub-folders and each sub folder contains multiple shapefiles for different types of data.

My aim is to iterate through these numerous folders and only select those shapefiles that I want to merge together into the national dataset  - e.g I want to grab all the shapefiles describing vegetation and merge them into a single vegetation shapefile with national coverage.

To do this I built the attached sub-model and main model to process all the files called ZONE_VEGETATION.SHP.

The data for each department has the same name so all the files I want are called ZONE_VEGETATION.SHP

The model runs but only gives me a single department (i.e. one ZONE_VEGETATION.SHP) as the output of Merge.

I am sure I am missing something obvious but it escapes me for now....

This is the beginning of a larger model I will need to run repeatedly as we plug in different test datasets and adjust certain weightings etc as part of a research project, so I need to automate as many steps as possible.

Model structure (Export of the python attached).

I am running ArcGIS Pro 2.5

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
curtvprice
MVP Esteemed Contributor

I just tried this (my model looks like yours) and it works fine. Does the submodel work, that is, if you open it up and run it do you get a list in the collect values output?

Working iterator model for ArcGIS Pro

View solution in original post

2 Replies
curtvprice
MVP Esteemed Contributor

I just tried this (my model looks like yours) and it works fine. Does the submodel work, that is, if you open it up and run it do you get a list in the collect values output?

Working iterator model for ArcGIS Pro

JonathanCarruthers-Jones
New Contributor II

Thanks Curtis, that is great  - I downloaded and tested your model on my local workspace and it works fine.

I cannot so far see the difference between yours and mine except that you used a lowercase file extension in the suffix for the wildcard input and the label for the output parameter is different. Mine does not produce a list though. 

Anyway it works so I will run with your version

thanks again ! 

0 Kudos