Does anyone know why my model builder does not work when I tried to incorporate a sub-model into my main model?

This is my problem:

I created a sub model in which copies featureclasses within a folder to another folder. I used the iterator featureclass to copy all of it and used $name% as my output name for each feature classes. I've set the input workspace and output it as my model parameters.

I then added the sub model into my main model which shows up with model parameters. It is connected to my merge process as the input.

I ran the model as a whole and it gave me error 000229: Cannot open ...\%Name%.shp warning. Failed to execute (Merge ALL feature classes in processing Folder)

This seems like the issue in which ArcGIS can not locate my featureclasses as it seems to interpret %name% as a shapefile name when it is the output from iterators?

1 Answer 1


Your sub-model should end with a Collects Value tool (exposed as a parameter). This collects the featureclasses and returns a list to the master model. Your merge tool can take this list as the input.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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