Merge error after Iterate Feature Selection

3675
2
Jump to solution
04-21-2016 05:42 AM
MaximeDemers
Occasional Contributor III

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:

subModel.png

Then I use the subModel output into another model to do the merge and the export to excel:

model.png

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

0 Kudos
1 Solution

Accepted Solutions
DarrenWiens2
MVP Honored Contributor

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.

View solution in original post

2 Replies
MaximeDemers
Occasional Contributor III

Nobody can help with this issue?

0 Kudos
DarrenWiens2
MVP Honored Contributor

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.