Select to view content in your preferred language

ModelBuilder: Change start point

920
2
07-15-2010 12:11 PM
__
by
Regular Contributor
Hi,

I have a model (see attached image) built in ModelBuilder that currently takes the following path:

CSV file with cooridinates and data --> Events Layer of points --> Shapefile of points --> Raster interpolated from points --> other stuff.

I want to make the model more useful by allowing the user to jump in at any step (ie, if they have a point shapefile or raster dataset, let them start the model there).

Any suggestions on how I can let the user specify where to start (and get the model to ignore the previous steps)?

Thanks.
Maria
0 Kudos
2 Replies
JoelCalhoun
Deactivated User
Maria,

If you are using ArcGIS 9.3 I'm not sure if there is an easy way to do it within ModelBuilder.  I believe in 10.0 ESRI has introduced some enhancements, including "if statements".

My recommendation would be to convert your model to a Python script tool.

First, I would export your model to Python. (If you are not familiar with Python programming there are plenty of exmaples in the ArcGIS Desktop help to get you going.  Python is pretty straightforward and easy to pick up.)
Next, add some simple logic to test the input parameters (i.e. csv, shp, raster) to decide which part of the code to run next.

Finally, create a tool for your script in ArcToolbox.


I hope that helps,


Joel
0 Kudos
__
by
Regular Contributor
Thanks for the quick response.

I'm using 9.3 and I have limited scripting experience. I explored the option of exporting the model as a script, but it seems that the model loses all documentation, parameters, and symbology options (where I set outputs to display according to a certain layer file).

Am I missing something, or do all these things really have to be recreated for the script?

Thanks again.
0 Kudos