Use the output of one tool as the input of another in one iteration (Model Builder)

308
5
12-04-2013 11:56 AM
JamariPowers
New Contributor III
I am using Model Builder. I have used the 'Strip Map Index Features' (Cartography --> Data Driven Pages --> Strip Map Index Features) within Model Builder. Upon running it, it produces an output shapefile that has an attribute table. There are some fields in the attribute table that I want to hide or remove really. I tried to accomplish this using the 'Make Feature Layer' (Data Management --> Layers & Table Views --> Make Feature Layer). The 'Make Feature Layer' can take the outputted shapefile as its input and display a field map of which fields to show and hide;  creating another outputted shapefile with an attribute table of the selected attributes.


Only problem is that this can't be accomplished in one step / iteration. YOu have to wait until the Strip Map Index Features tool is done running and produces the output file. You can then use this file as input to the Make Feature Layer tool. I'm curious to see if there is a way or method to connect two tools together like this to view only specific fields that you choose in the attribute table,

Any help on this topic would be of great help. I've already consulted one "Esri guru" on this matter but his solution relied on validation scripts to expose the attribute list. Not sure if I'd be able to accomplish this. Would need more direction.

Thanks in advance.
0 Kudos
5 Replies
AnthonyGiles
Frequent Contributor II
Jamari,

What is the reason why you cannot take the output of your strip map index features and use it as the input for your make feature layer?

If you are adding both tools into model builder, delete the input for the make feature layer tool and use the connector tool to connect the output from your strip map index to the make feature layer.

Regards

Anthony
0 Kudos
JamariPowers
New Contributor III
From Model Builder, when I'd use the output of the Strip Map Index Feature as Input to the Make Feature Layer, a field map list woulnd't generate and I wouldn't be able to even pick fileds that I wanted in my attribute table.

But let me try using the Connector tool, as soon as I locate it. I'm not familiar with that many tools.

Thanks.!
0 Kudos
JamariPowers
New Contributor III
I guess, what I meant to say was how do you add a connector to the make features layer tool withought specifying its input as the output from strip map index features>?
0 Kudos
AnthonyGiles
Frequent Contributor II
Right, I think I understand the problem now, as you have not created the output yet you cannot get the table to populate with the fieldnames.

Have you tried running the strip map tool on its own to get the output needed, then use this file as the input to the make feature layer so you have the fields available.

In model builder leave the two tools as separate instances and put a pre condition on the make feature layer, so it doesn't run until the strip map has finished.

Regards

Anthony
0 Kudos
JamariPowers
New Contributor III
Correct....thats my issue. And yes I've tried the case to where could wait until the initial tool runs (Strip Map Index Features), stops running and produces "output", open another tool (Make feature layer), then use the "output" as input to the MFL...but that seems like so many more extra steps for the user (building this for a customer  -- a not so computer savy customer), wouldn't you agree>? lol

I'll try the pre-condition idea and see where it takes me, as well as continuing to research. I appreciate your help and ideas, Thanks!
0 Kudos