ModelBuilder - if/then at beginning of route model

3914
1
01-16-2015 11:38 AM
TobyJacobs1
New Contributor II

I'm working on a model to automatically generate ideal routes for mail delivery. The first thing it needs to do is ask the user whether he/she is doing a full route or a partial route. Then, it should go to one of two separate processes to either generate directions for a full route (based on the user putting in a single route number) or to generate directions for specific coded stops (entered individually by the user).

I have an if/then question at the beginning (Full Run or No) which asks the user whether they are doing a full route (Y or N). However, when I run this as one big model, the initial dialogue box includes the Full Run question (Y or N), a space for the user to enter the full route query, AND the a space for them to enter specific stops.

When I make full run and partial run sub-models, neither shows up in the dialogue box at all and the model runs but doesn't really do anything.

What I would like is a series of sequential dialogue boxes. The first one should ask "Full Run or Partial Run?" and the next one should EITHER be the run number request OR the multivalue stops request (based on whether the user picked Y or N). Anyone know of a way to do this? I know very little Python, so a pure ModelBuilder solution or just a conceptual explanation would be ideal

 

This is the main model:

The main model with labels

And this is what each of the two sub-models look like:

Basic sub-model (of which there are two)

 

Any help is greatly appreciated. Thanks!

0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor

It looks to me that for both of your sub-models the elements linking to them are preconditions and not actually a link passing information into them. Your sub-models have a single parameter (Expression) but you have not exposed them in the master model, may be this is what you need to do? You need to right click on your sub-models and expose that expression parameter.

0 Kudos