-1

Having a lot of trouble trying to run a model I built in ModelBuilder in Python. What is the proper way to do this? I'm adding the toolbox then running the model. Seems easy enough but I'm getting an error saying the Tool is not valid.

Ultimately, I read that running models in Python is going to be faster than if I did it in arcGiS Pro. If that is not the case then this is all pointless. Would love some additional input.

Utilizing this article here: support.esri.com/en/technical-article/000012716

import arcpy    
toolbox = arcpy.AddToolbox(r"C:\Users\dsser\Documents\ArcGIS\Projects\MyProject1\Toolbox.tbx")
toolbox.ModelDS()
print("Script finished")
2

I've never used AddToolbox as a way of running a model in python, even their help suggests using ImportToolbox!

Have a look here and take note of the alias as suggested by @Polygeo.

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.