Modelbuilder: User selects 1 of 2 shapefiles as a single input.

04-23-2012 01:04 PM
New Contributor
This one may be simple, but it is eluding me.

I have an input shapefile to a process that needs to be 1 of 2 possible files (These options are static files)

I want the user to select one from a list. Basically the tool works either in Greenland or Antarctica and uses a point shapefile.
(There is one for Greenland and one for Antarctica).

The user should select from the list whatever are they are in and the associated file would be chosen and then used in the rest of the process.

Any help appreciated!

0 Kudos
2 Replies
Esri Regular Contributor
Try this:

Create a string variable in the model and rename it to Location.
Make it a model parameter. Set a value list filter on this variable (read help)
The value list will have two values - 1) Greenland 2) Antarctica
Rename your feature class to have the same spelling/name as these entries in the value list.

Value list is the way a user would choose a location.

Now use the variable name in the input path to your tool like this - C:\Temp\%Location%

This inline variable substitution is the way the user selected value will be used in your tools to select the input.
0 Kudos
New Contributor

I was so close to the solution and all it took was a fresh mind to take it the rest of the way!

I already have the string variable with a value list selection built in. With some file renaming and insertion of the string into the path it will work perfectly!

Thank you!
0 Kudos