1

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:

enter image description here

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

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?

  • 1
    I know this sounds stupid, but if you delete both the submodel and merge from your model, then add them back in again (from scratch, not a copy of what you just deleted), then it may work. After all, this is simply an issue with input/output names correct? At least for myself, this has been a fix in the past. – Goldring Apr 21 '16 at 18:14
  • Yes I think its because I save all output with same name, so I'll try using %Value% in the name – Below the Radar Apr 21 '16 at 18:19
  • Good idea. Let us know if that worked – Goldring Apr 21 '16 at 18:21
  • See my solution below, maybe you can improve it. – Below the Radar Apr 21 '16 at 18:47
1

The problem was that outputs from iterator in subModel had always the same name ie: "Lines".

My solution is to save every output of subModel in a new FC named with the group by value %Value% using inline variable substitution

You can see the solution in the red square below:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.