Select to view content in your preferred language

Python Script

894
1
09-17-2018 01:28 PM
josuedi
Regular Contributor

Hello everyone,

I'm new to using Python Scripting for ArcGIS and I'm creating a model where I want to create heat map from an excel table. I did the model in ModelBuilder and then I exported it to Python but I do not know how to configure the parameters to run the toolbox in ArcMap or ArcGIS Pro. I enclose the model so I can get help if possible. I'll thank you in advance for any help you can offer me.

regards.

Tags (3)
0 Kudos
1 Reply
MarisaClaggett
Frequent Contributor

Hi,

In your script, the parameters are already set, for example, in the line, v_Data_para_mapas_PN__ = arcpy.GetParameterAsText(0).  This is because you set those parameters in the model.  If you would like to use this script in a script tool in ArcMap or arcGIS Pro, you will need to set the parameters in the tool as well.

Setting script tool parameters—Help | ArcGIS for Desktop 

In the Parameters tab of the script tool properties, the parameter has to match up with the index number of the parameter in the script.  For example, the line I mentioned before will need to be the first one listed because that index is 0, then 1 and 2 will need to be listed next in order to set the input from the user to correspond with the parameter in the script.  Just make sure to set the Data Type of the parameter correctly based on how it will be used in the script.  

Hope this helps!

Best,

Marisa