<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Run a notebook using model builder in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/run-a-notebook-using-model-builder/m-p/1358542#M69363</link>
    <description>&lt;P&gt;Emeka,&lt;/P&gt;&lt;P&gt;Yes, you can use a Precondition in Model Builder to determine which parts of disconnected processes run first.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/help/analysis/geoprocessing/modelbuilder/using-preconditions.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/3.1/help/analysis/geoprocessing/modelbuilder/using-preconditions.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However, to make a precondition, you need to configure your script tool to have an output parameter.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/adding-a-script-tool.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/adding-a-script-tool.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You configure the output of the script tool to be the precondition for starting the next tool by connecting the output to the next tool as a precondition.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Dec 2023 14:00:51 GMT</pubDate>
    <dc:creator>BobBooth1</dc:creator>
    <dc:date>2023-12-08T14:00:51Z</dc:date>
    <item>
      <title>Run a notebook using model builder</title>
      <link>https://community.esri.com/t5/python-questions/run-a-notebook-using-model-builder/m-p/1357375#M69338</link>
      <description>&lt;P&gt;I am am quite new to writing python scripts using the notebook on ArcGIS pro. I have a script that runs perfectly and it is part of a larger analysis. For the full analysis I have built a model builder with several geoprocessing tools included.&lt;/P&gt;&lt;P&gt;I want to know how I can add this notebook script to be part of the model I'm building.&amp;nbsp;As this model houses multiple analyses, I want tho have all the tools including the python script from the notebook run all at once by one click.&lt;/P&gt;&lt;P&gt;I really appreciate any suggestion on this.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 15:05:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/run-a-notebook-using-model-builder/m-p/1357375#M69338</guid>
      <dc:creator>EmekaUde</dc:creator>
      <dc:date>2023-12-06T15:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Run a notebook using model builder</title>
      <link>https://community.esri.com/t5/python-questions/run-a-notebook-using-model-builder/m-p/1357610#M69344</link>
      <description>&lt;P&gt;I would suggest exporting the notebook to a .PY script file, and then in ArcGIS Pro, in a toolbox, configure a script tool to point to the script. One you have a script tool configured, you can add the script tool to your model, and it will be run when you run the model.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/a-quick-tour-of-creating-tools-in-python.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/a-quick-tour-of-creating-tools-in-python.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This tutorial shows how to convert a Notebook to a PY script and configure it as a script tool:&lt;/P&gt;&lt;P&gt;&lt;A href="https://learngis.maps.arcgis.com/home/item.html?id=24e13f2f4fe8453b9d1107e1f5b1d3cf" target="_blank"&gt;https://learngis.maps.arcgis.com/home/item.html?id=24e13f2f4fe8453b9d1107e1f5b1d3cf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 19:36:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/run-a-notebook-using-model-builder/m-p/1357610#M69344</guid>
      <dc:creator>BobBooth1</dc:creator>
      <dc:date>2023-12-06T19:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Run a notebook using model builder</title>
      <link>https://community.esri.com/t5/python-questions/run-a-notebook-using-model-builder/m-p/1358297#M69359</link>
      <description>&lt;P&gt;Thank you Bob, your response was really helpful. Is there a way I can force this script to run first before other tool in the model?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 21:24:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/run-a-notebook-using-model-builder/m-p/1358297#M69359</guid>
      <dc:creator>EmekaUde</dc:creator>
      <dc:date>2023-12-07T21:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Run a notebook using model builder</title>
      <link>https://community.esri.com/t5/python-questions/run-a-notebook-using-model-builder/m-p/1358542#M69363</link>
      <description>&lt;P&gt;Emeka,&lt;/P&gt;&lt;P&gt;Yes, you can use a Precondition in Model Builder to determine which parts of disconnected processes run first.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/help/analysis/geoprocessing/modelbuilder/using-preconditions.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/3.1/help/analysis/geoprocessing/modelbuilder/using-preconditions.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However, to make a precondition, you need to configure your script tool to have an output parameter.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/adding-a-script-tool.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/adding-a-script-tool.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You configure the output of the script tool to be the precondition for starting the next tool by connecting the output to the next tool as a precondition.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 14:00:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/run-a-notebook-using-model-builder/m-p/1358542#M69363</guid>
      <dc:creator>BobBooth1</dc:creator>
      <dc:date>2023-12-08T14:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Run a notebook using model builder</title>
      <link>https://community.esri.com/t5/python-questions/run-a-notebook-using-model-builder/m-p/1358899#M69370</link>
      <description>&lt;P&gt;Thank you so much Bob. Your answers were really helpful.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Dec 2023 18:15:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/run-a-notebook-using-model-builder/m-p/1358899#M69370</guid>
      <dc:creator>EmekaUde</dc:creator>
      <dc:date>2023-12-10T18:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Run a notebook using model builder</title>
      <link>https://community.esri.com/t5/python-questions/run-a-notebook-using-model-builder/m-p/1603002#M73989</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/95621"&gt;@BobBooth1&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/586472"&gt;@EmekaUde&lt;/a&gt;&amp;nbsp;, thank you so much!! This is quite possibly the most helpful community post I have seen. I needed to do this workflow and I had no idea if it was possible. You helped me immensely. Thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Apr 2025 21:43:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/run-a-notebook-using-model-builder/m-p/1603002#M73989</guid>
      <dc:creator>AndreaB_</dc:creator>
      <dc:date>2025-04-04T21:43:42Z</dc:date>
    </item>
  </channel>
</rss>

