Select to view content in your preferred language

Model Builder - "Tool has no parameters"

4281
3
12-06-2013 07:16 AM
Lebowski
Frequent Contributor
I just imported a script that I want to use in my model however when I import the script into modelbuilder I keep getting the message "This tool has no parameters."

I know this maybe a fairly obvious question but what does this mean? And why is this preventing me using the script?

FYI: The script is to calculate acreage for a field I created. I know some of the parameters I want to set the 'Type' = Double, 'Precision'=9 & 'Scale' =2.

I am sure I am probably missing the obvious but any help would be greatly appreciated.

Thanks
Tags (2)
0 Kudos
3 Replies
GerryGabrisch
Frequent Contributor
If you developed a script, and you have hard-coded all the parameters like the path to the data, the attribute to populate....then you can click OK and the script will run.
0 Kudos
GerryGabrisch
Frequent Contributor
Scripts and models can have the parameters coded into them which will give you that message.  Don't you see an OK button on the bottom, and if so, what happens when you click it.
0 Kudos
MaxSquires
Frequent Contributor
I just imported a script that I want to use in my model however when I import the script into modelbuilder I keep getting the message "This tool has no parameters."


In order to expose the parameters of a script to model builder you will need to define the parameters of the script.

If you are using a python script tool you will need to right click the script (in arccatalog) and select the properties context menu item.  Then you can go to the parameters tab where you will have to define the parameter names and types in order for them to be recognizable by the arcgis environment.  In the script, there also must be parameters that are ready to be exposed in the arcgis environment.  that is, you will need to ensure that there are input and output parameters (if required) that are defined similar to
input = arcpy.GetParameterAsString(0)
output = arcpy.SetParameter(1)


Note that you will need to have a parameter that corresponds to these script parameters defined the scripts properties page for parameters in order for it to function correctly.

If you are using a custom geoprocessing tool written in arcobjects you may have to register externally created libraries using the EsriRegAsm.exe http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000004n6000000 and ensure any configurations and prerequisites are available to the application.

If you provide more detail about your script or the script itself I may be able to offer more insight.

Hope this helps
0 Kudos