0

I have a model that I have had to go through to model parameters in order to create a geoprocessing service. Is there a way to check all sources that are being used in the model via python? I am attempting to publish a geoprocessing Service, however one of my sources is not registered with server which prevents my service from being published.

  • 2
    I think if you export the ModelBuilder to a Python script, the sources will all be listed somewhere in the resulting file. (I wouldn't recommend trying to run Python generated automatically by ModelBuilder, but if you're just looking through to find data sources, no problem.) – Erica Sep 11 '14 at 16:09
  • That's a great idea, and it works. – Geoffrey West Sep 11 '14 at 16:26
  • Found the error in my model, its still proving easier to update the soruce via Python, is there a method to import a python script to a model? – Geoffrey West Sep 11 '14 at 16:37
  • No. You can include a python script as a tool within a model, but not directly go from Python to ModelBuilder. (And you CAN run the ModelBuilder-generated script in Python, but that is prone to problems because ModelBuilder just doesn't write very nice Python and may include ModelBuilder-only tools...) – Erica Sep 11 '14 at 16:50
2

If you export the ModelBuilder to a Python script, the sources will all be listed somewhere in the resulting file.

(I don't recommend trying to run Python generated automatically by ModelBuilder, but it will quickly show you all the data sources the model/script is using.)

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.