export a Python script to a model

535
3
Jump to solution
03-03-2022 04:22 PM
Chelsea_Trusdell
New Contributor

can export a model from ModelBuilder to a Python script, but you can’t export a Python script to a model. Explain why you can’t export a Python script to a model

0 Kudos
1 Solution

Accepted Solutions
ABishop
MVP Regular Contributor

Hello Chelsea,

There is a way to create a script tool inside a toolbox then add it to the model as part of your workflow.  See this tutorial: https://pro.arcgis.com/en/pro-app/2.8/arcpy/geoprocessing_and_python/adding-a-script-tool.htm 

After you create the script tool, you can add it to your model.

Hope this helps!

Amanda Bishop, GISP

View solution in original post

0 Kudos
3 Replies
ABishop
MVP Regular Contributor

Hello Chelsea,

Are you using ArcMap or ArcGIS Pro?

Amanda Bishop, GISP
0 Kudos
Chelsea_Trusdell
New Contributor

hello, Arcpro 

0 Kudos
ABishop
MVP Regular Contributor

Hello Chelsea,

There is a way to create a script tool inside a toolbox then add it to the model as part of your workflow.  See this tutorial: https://pro.arcgis.com/en/pro-app/2.8/arcpy/geoprocessing_and_python/adding-a-script-tool.htm 

After you create the script tool, you can add it to your model.

Hope this helps!

Amanda Bishop, GISP
0 Kudos