I would like to use the model builder to solve OD Cost Matrix in iterations because my origins/destinations FC need to be grouped by attributes. I use the Iterate Feature Selection tool to do so. After performing all OD Cost Matrix in loop, I want to merge all result lines into a single FC and export its table into an excel sheet.
I separate the Iteration part of the process into a subModel with a Collect Values as output:
Then I use the subModel output into another model to do the merge and the export to excel:
The subModel seems to run in iteration correctly, but when it's time to merge the output I got these errors:
ERROR 000622: Failed to execute (Merge). Parameters are not valid.
ERROR 000400: duplicate input not allowed
Can someone have an idea what is incorrect in my process?
Thank you
Solved! Go to Solution.
I suspect what's happening is all of the values collected at the end of the submodel have the same name ("Lines","Lines","Lines",etc.). The layer names must be unique for the Merge tool (I believe this requirement is undocumented, but try it in ArcMap - it doesn't work). Try naming your collected values with iterator variable "%Value%" using inline variable substitution.
Nobody can help with this issue?
I suspect what's happening is all of the values collected at the end of the submodel have the same name ("Lines","Lines","Lines",etc.). The layer names must be unique for the Merge tool (I believe this requirement is undocumented, but try it in ArcMap - it doesn't work). Try naming your collected values with iterator variable "%Value%" using inline variable substitution.