Model builder: From seven to one tool?

10-19-2017 01:44 AM
New Contributor II

I am trying to merge 7-model builder processes to 1. I have a geodatabase with five shapefiles who is the results from a transportation analyse. Each of the shapes are identical except for the filed that show amount of traffic for different years.  I want a new shape that shows traffic for year N, N+1, N+2 and N+3 and difference between N and N+1, N and N+2, N and N+3 I have made 7 different processes with model builder to do this but are hoping to do everything in one.

1. The shapes are missing spatial references so first I use the Define project tool for the whole geodatabase

2. The Traffic field have the same name in every shape so I have to change it using the “alter field” tool. From “Traffic” to Traffic2010, “Traffic2020” and so on. Hope there is a more smooth way to do it then this?

3. I wana keep the original shapes so I make a copy of the base shape

4. Then i remove the fields i don`t need anymore from the new base shape

5. "Join field tool" to join traffic fields from N+1, N+2, N+3 to the base shape

6. Then I add new fields to the joined base shape to show the differense between YearN and N+1and so on.

7. Then i uce Calculate field tool on the new fields: 

It’s working, but It is a big embarrassing mess. I’m hoping for a way to do this in one process where I just define all input and output variables, and hit run…

Tags (1)
0 Kudos
3 Replies
MVP Esteemed Contributor

Why not parameterize inputs and outputs for your models and add them as tools to a master model to run them all?

New Contributor II

Yes, I think that is what i need, to bad i dont hade the basic modelbuilder skills to fiks it... Guess i have to read up on the subject 

0 Kudos
MVP Legendary Contributor

sub models

integrating a model within a model, or scripts within a model

if you have the bits, then you should be able to string (that is... connect) the outputs from one to the inputs of another, if you get your input and output variable names standardized, so you don't call the output from one process X and it needs to be the input to the next step, but you called the input Y