I have been looking at ways to run a ArcGIS model directly in arcpy, without having to export it and correct all sorts of things in the code. But somehow I can't seem to make it work. This is how I wrote the code, in which Workshop.tbx is the real name of the toolbox, TestAlias is the alias of the toolbox and Workshopmodel is the name of the model I want to run.:
import arcpy arcpy.env.overwriteOutput = True arcpy.env.workspace = r"c:/ArcGISdata" arcpy.ImportToolbox(r"c:/ArcGISdata/Workshop.tbx") arcpy.Workshopmodel_TestAlias print "Script finished"
Can anyone help me along?