Invalid value for Sub layer?

3241
1
04-26-2015 06:47 PM
SimonJackson
Occasional Contributor III

I need to generate multiple service area polygons for different time periods throughout the day.

  • I have created a model, this includes an iterator (iterate field values) that is using the time periods from a separate CSV file.
  • In the Make Service Area, I make use of an inline variable for changing the output layer name in make service area to Service Area%i% (i.e this keeps it from overwriting the output).

I am getting exactly this error (Invalid Subvalue for Sub Layer) when trying to add locations to a service area within ModelBuilder. However, the symptoms mentioned in that link relate to my tool being called from a differing language, and mines the standard US install.

SublyrIssue.gif

  • If I try exposing the sub layer parameter, the model provides me with a dropdown where it has Facilities to choose from.  Still get same error.
  • If I remove the inline variable, it loops through Making Service Area until it finishes on the final date/time from the CSV, and then runs the solve on the final date/time.
  • If I remove the Iterator, it works fine for one date/time pair.
  • If I have the add-to display for ServiceArea%i%, it does successfully add ServiceArea0, which has the sublayer Facilities within it, but its still failing on the Add Locations with not being able to find the sublayer!!
  • Have also tried playing with adding a precondition on AddLocation to ServiceArea%i%, but has no affect.
0 Kudos
1 Reply
SepheFox
Frequent Contributor

Hi Simon, I have to say, while I see the utility of adding an animation of the problem, it makes it really hard to examine your model and understand how it is constructed! Posting a static picture of the full model would probably be helpful. I got kind of dizzy staring at it! Anyway, one way I have made iterators work better in modelbuilder, is to make submodels out of them, and then add that in to your main model. It's worth a try. Especially if you're getting it to work fine without the iterator.