I have created a model in a custom toolbox with ModelBuilder in ArcMap 10.1.
Is it possible to trigger the model outside ModelBuilder and ArcMap?
For example, use a Python script to trigger the model to operate?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
Sure, you can use
ImportToolbox to do the job (docs):
import arcpy arcpy.ImportToolbox('C:/tools/my_toolbox.tbx') arcpy.MyModel_MyToolbox()
Note that the 'MyToolbox' part in the third line comes from the toolbox
Alias you set, and
MyModel should match the name of the model or function. This should work equivalently for Script tools, ModelBuilder models, and Python Toolbox tools.