Iterate with sub model iteration

4048
2
Jump to solution
11-24-2014 03:02 PM
DavidCampbell
New Contributor III

Hi All,

 

I have a model within a model. Each model has an iterator. The sub model has a iterate feature class instance and the main model has an iterate row selection. I need for each feature class a field calculated based on the individual polygon locations within the area of the selected row.

 

I have tries to pass the sub model to a collect values tool and use that as a parameter for the main model but "make feature layer" does not allow that as an input. How do I get each instance of the iterate sub model into the make feature layer command to create my selection?

 

Thanks,

 

David

0 Kudos
1 Solution

Accepted Solutions
DavidBlanchard
Esri Contributor

If I understand what you are trying to do correctly, you are trying to pass each feature class to the Make Feature Layer tool. If this is correct, your models are reversed. The Proxy_Background model needs to be the parent model, and the Step_12_Caribou model needs to be the child model. The following is what you need to do to each model:

Step_12_Caribou

  1. Remove the Proxy_Background model and it's Iterates output
  2. Right-click Make Feature Layer > Make Variable > From Parameter > Input Features
    This will allow you to make the input feature to this tool a parameter to the model
  3. Right-click the newly created Input Feature variable, and set is as a Model Parameter.

Proxy_Background

  1. Remove the Collect Values tool and its output
  2. Add the Step_12_Caribou model
  3. Connect the Feature Class output (on your screenshot named: Mkey_MUL3.shp) as the Input Features to the model

This will produce one output from Step_12_Caribou for each feature class found in Proxy_Background.

View solution in original post

2 Replies
DavidCampbell
New Contributor III

No one?

0 Kudos
DavidBlanchard
Esri Contributor

If I understand what you are trying to do correctly, you are trying to pass each feature class to the Make Feature Layer tool. If this is correct, your models are reversed. The Proxy_Background model needs to be the parent model, and the Step_12_Caribou model needs to be the child model. The following is what you need to do to each model:

Step_12_Caribou

  1. Remove the Proxy_Background model and it's Iterates output
  2. Right-click Make Feature Layer > Make Variable > From Parameter > Input Features
    This will allow you to make the input feature to this tool a parameter to the model
  3. Right-click the newly created Input Feature variable, and set is as a Model Parameter.

Proxy_Background

  1. Remove the Collect Values tool and its output
  2. Add the Step_12_Caribou model
  3. Connect the Feature Class output (on your screenshot named: Mkey_MUL3.shp) as the Input Features to the model

This will produce one output from Step_12_Caribou for each feature class found in Proxy_Background.