If I have a web page form with 'submit' on this simple Javascript API sample, how would I call the Python script on clicking the submit button? any thoughts or ideas?
Solved! Go to Solution.
Julie,
Yes, you are on the right path. The parameters you are filling in have to be tied to the logic you will use to do the analysis you are trying to run. Otherwise they are just parameters.
If you are trying to run it in a web browser, you will need to publish the script to ArcGIS Server to be able to access it from the web.
Regards,
Tom
Julie,
You could publish your python script as a geoprocessing service on your ArcGIS Server.
Regards,
Tom
Good idea Tom, I will give that a try.
You did that with your ibus app right?
Thanks!!
Julie,
The iBus app used queries to map services of feature classes. But I do have another app the calls a geoprocessing script. The python geoprocessing script creates a parcel map PDF when a link or button is clicked for the related parcel being displayed.
Regards,
Tom
Hi Tom,
Please guide me through this.
I am using ArcGIS 10.2 and
- At the desired location, I created a new toolbox in ArcCatalog.
-Right clicked the toolbox and Added a python script.
-Pointed it to my python script.
-Created two parameter values
Am I in the right path?
My python script has a function that takes two parameters
def formInfo(Name, activeMile):
Now, when I run the toolbox I created, it let me fill two parameters but it doesn't look like it is passing it to the script. The tool gives the message that it ran successfully but it doesn't look like my script with the parameter.
In 10.2 , there is also an option to create a new 'Python Toolbox' should I be using this? any thoughts?
appreciate your help!!
Julie,
Yes, you are on the right path. The parameters you are filling in have to be tied to the logic you will use to do the analysis you are trying to run. Otherwise they are just parameters.
If you are trying to run it in a web browser, you will need to publish the script to ArcGIS Server to be able to access it from the web.
Regards,
Tom
should I be doing this?
Tom,
That helped!! I have tied the parameters with the logic....phew.
next will get to publishing it to the server.
Julie,
Excellent! I should have put a link for you about retrieving the parameters in the last message.
Regards,
Tom
Hey Tom,
I am using a tool called arcREST( Esri/ArcREST at October2014v1.0Final · GitHub ) in my Python script.
On the ArcGIS Server,
- we installed arcREST tool
- The script ran successfully.
- Created a Toolbox and added the Python script.
- The toolbox ran successfully
- Created a geoprocessing service
- Gives error saying "no module named arcrest Failed to execute"
- Based on this link , tried using sys.path.append
- Still the same error. "no module named arcrest Failed to execute"
Any thoughts ? idea ?