Setting model variables as parameters |
Geoprocessing |
Segment 14 of 16 |
Top Previous Next |
In a similar way to setting variables as parameters for the dialog box of a script, as you saw in Exercise 3, you must set the variables in the model as model parameters that you want to display in your model’s dialog box.
Right-click the Find Potential Habitat tool and click Edit to open the model. Right-click the element vegtype and click Model Parameter.
A P icon will appear next to the element indicating it is set as a model parameter.
Right-click vegtype and click Rename. Type “Input Vegetation” and click OK. This is the name that will be displayed for the input data parameter in the model’s dialog box.
Right-click Output Habitat Locations and click Model Parameter.
Click the Model menu and click Save, then click the Model menu again and click Close.
The Properties dialog box provides a way to change the name of the model, set parameters (an alternative way to setting them within the model), change their order, and set the tool’s environment settings.
Right-click your Find Potential Habitat model and click Properties. Click the Parameters tab.
Notice the two variables set as model parameters for the user to specify values in the model’s dialog box. The order of the parameters can be changed by clicking a parameter, then clicking Move Up or Move Down. The order for the parameters in the model’s dialog box mimics the order seen in this list.
Click Add to see the variables that could also be set as parameters, then click Cancel on the Add Model Parameter dialog box.
Click Cancel.