0

I want to use some variables in a geoprocessing service like a URL, that should be configurable from the arcgis ardmin or manager. Is it possible have a tool input, which value will be specified by the admin, after the service have been published?

  • 1
    You cannot configure any property of a geoprocessing service once it's published from the Manager or ArcGIS Admin Directory. The best approach is to create a configuration file which will be read upon execution of the GP service's task(s). – Alex Tereshenkov Jan 20 '15 at 10:57
  • @AlexTereshenkov How can I use a configuration file along with a GP service? should the file be hosted along with the GP service ? – Smalis Jan 20 '15 at 11:18
1

I usually recommend doing that in this way.

  1. Create a skeleton Python file which you will turn into a Python script tool in a toolbox.

  2. Use sys.path.append to append the folder where all the "meat" .py files will be stored.

  3. Then just import those files as modules. Place a configuration file (can be .py or any other file) there.

This will make it significantly easier to modify the code since you won't need to republish the service (or manually update the published code).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.