Modelbuilder select from list

6217
6
11-19-2010 07:08 AM
NDonnelly
New Contributor
Sounds like this should be easy...

First step of model would prompt user (creating a parameter would be needed) to select a value from a drop-down list, representing a field of a feature class.

What would be the best way to accomplish this? 

Thank you
0 Kudos
6 Replies
ChrisMathers
Occasional Contributor III
Right click in the white space of your model and select "Create  Variable". Right click on whats just been created and click "Model Parameter". Thats it. I would need to know what you are doing to help you tie this to a tool though.
0 Kudos
NDonnelly
New Contributor
Thank you.

Essentially what I'm trying to do is:
-Populate list of values from a field in the 1st feature class
-User selects a value from list
-Select Layer (2nd feature class) By Location using the selected feature in the 1st feature class
0 Kudos
LoganPugh
Occasional Contributor III
Think you'll have to be more descriptive, at least I am still vague about what you're trying to do. Also let us know whether you're using ArcGIS 9 or 10.

The first two steps you mention sound very similar to this question, which would require you to write Python code and create a script tool: http://forums.arcgis.com/threads/17353-Using-Tool-Validator-to-populate-a-drop-down-with-values-from...

An overview of writing geoprocessing scripts: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=An_overview_of_writing_geoprocessing_s...
An overview of creating script tools: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=An_overview_of_creating_script_tools
0 Kudos
BenGustafson
New Contributor
Hi!  I'm actually trying to do something similar to this.  Is there a way to have the user select specific attributes in a table without python scripting?

For my project, I have a table which contains dates and a times that correspond to tide levels.  I just want the user to be able to select the date from a drop-down, then select the time from a drop-down, and those two attributes would allow a selection of the corresponding elevation in the same table.  I would like to pass that value into the contour list tool and create a single contour polyline. 

Seems like there should be an easy way to have input variables like these without Python.  Does anyone know if this is possible?
0 Kudos
ShitijMehta
Esri Regular Contributor
Check Value List filter

Also check the blog - Generating choice list from a field


For your purpose simply setting a value list on a string type variable will help.
0 Kudos
BenGustafson
New Contributor
Thank you for the response!  Unfortunately, it looks like your suggestions might not work for me (unless I'm overlooking something).

I think I do need to generate a value list from my table (it has over 70,000 unique z-values), but I can't seem to use the script you linked to.  My guess is that this because I'm using 9.3.1 rather than 10 (I can't use 10 because the field station I'm making this for is not planning to upgrade to 10 anytime soon).

I think I may have to accept the fact that a Python approach is necessary here.  I just wish it wasn't so difficult to script lists of values for user inputs (in this case, Date and Time values from my table).
0 Kudos