Select to view content in your preferred language

Add form to Model Builder script?

490
1
05-26-2010 12:27 AM
rembert
Emerging Contributor
I have a Model Builder model that has 9 function. The last function creates a raster coverage called wind.img
I would like to add a text form so the user can enter a prefix (saved as a string) so the raster will be called May2008_wind.img

That's it. 🙂

Please help!!  Thank you.
0 Kudos
1 Reply
HaydenLewis
Emerging Contributor
If you have not sorted this yet, I would suggest that you save the model as a Python script and add a variable line to the script (use notepad etc) under "gp.AddToolbox....." like:
VAR1 = gp.getparameterastext(0) #This is the variable for arcmap field they will type May2008 in

And then in the output path on the .img file type this in front of ".img"
+VAR1+".img" #this adds the variable to the raster output filename

Then in arcmap. Adds the py script to an arcmap toolbox. In the parameter settings add a "display name" called "name" and set the data type as "string"

Hope this helps???
0 Kudos