Saturday, 3 November 2018

arcgis desktop - Iterating with sub model iteration


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 tried 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?


enter image description here




I will elaborate a bit about what is happening in the proxy_background that is causing me trouble before I try the suggestions. The iterate inside of the sub-model is running completely before passing each individual feature class to the main model. Essentially, if my file location has 20 feature classes, it iterates 20 times, not once, before it moves to the main model. This is why I put the Collect Values tool thinking I will at least have the paths to move forward. Alas, it did not want to connect to my main model.



Answer




You can run the output of the Proxy_Background through the copy features tool with the output called in_memory\temp then connect it to your make feature layer tool.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...