15.02.2017 Views

Learning ArcGIS Pro

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Making a model interactive<br />

So you have created your first model. It is a very efficient tool that will help you quickly<br />

update information. However, what happens if the buffer distance changes or the Director<br />

wants to look at different layers such as land use or just the commercial properties?<br />

Right now your model is hardcoded to a specific set of variables. If something changes,<br />

you will be forced to edit the model before it can be used. Wouldn’t it be more effective to<br />

allow others to specify different values for the variables in the model when they run it?<br />

You can allow that. It simply requires you to designate a variable as a parameter within the<br />

model. This allows the user to provide a value before they run the model.<br />

To designate a variable as a parameter so a user can specify a value when it is run, you<br />

simply right-click on the variable in ModelBuilder and select Parameter. When you do, a<br />

small capital P will appear next to the variable indicating it is now a model parameter as<br />

illustrated in the following screenshot:<br />

In this example, you can see that the Parcels and Parcels_SteamBuff_Union variables<br />

are both marked as parameters. This will allow the user to select the values they wish to<br />

use for those variables. This means they will be able to union the stream buffers with<br />

another layer besides just the parcels layer and control where the results are saved to and<br />

the name it is given.<br />

Making a model interactive can greatly increase its functionality. It will allow the model to<br />

be used in different scenarios and datasets. The downside is the more interactive you make<br />

a model, the greater the chance to introduce operator errors. Users may select the wrong<br />

input layer for a tool or forget where they set the final results to be saved. This can result<br />

in more problems than the model was designed to solve. So it is always a balancing act<br />

between flexibility and hardcoding to eliminate error sources.<br />

Now, let’s give you an opportunity to make your model interactive.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!