Solved! Go to Solution.
import arcpy #Import the toolbox containing the models. arcpy.ImportToolbox(r"c:\temp\toolboxname.tbx", "toolboxAlias") #Run each model as though it were a tool arcpy.ModelName_toolboxAlias() arcpy.Model2Name_toolboxAlias() arcpy.Model3Name_toolboxAlias()
import arcpy #Import the toolbox containing the models. arcpy.ImportToolbox(r"c:\temp\my_analysis.tbx", "models") #Run each model as though it were a tool arcpy.CustomBufferIntersect_models() arcpy.CreateNewFeatures_models() arcpy.MakeSurface_models()
import arcpy #Import the toolbox containing the models. arcpy.ImportToolbox(r"c:\temp\toolboxname.tbx", "toolboxAlias") #Run each model as though it were a tool arcpy.ModelName_toolboxAlias() arcpy.Model2Name_toolboxAlias() arcpy.Model3Name_toolboxAlias()
import arcpy #Import the toolbox containing the models. arcpy.ImportToolbox(r"c:\temp\my_analysis.tbx", "models") #Run each model as though it were a tool arcpy.CustomBufferIntersect_models() arcpy.CreateNewFeatures_models() arcpy.MakeSurface_models()
import arcpy#Import the toolbox containing the models.arcpy.ImportToolbox(r"c:\temp\my_analysis.tbx", "models")#Run each model as though it were a tool#use try/except for finding major failures.#use getmessages to find more specific info.try: arcpy.CustomBufferIntersect_models() msg = arcpy.GetMessages() if msg.lower().find('error 000375'): print "Do something!" else: print "That's not working, do something else!" arcpy.CreateNewFeatures_models() arcpy.MakeSurface_models()except: print 'Oh no! Something went wrong'