1

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?

4

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.

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.