<?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: Running a Model from A model in Python in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/running-a-model-from-a-model-in-python/m-p/1577230#M92126</link>
    <description>&lt;P&gt;Hey &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/759090"&gt;@TaiDuong&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Python&amp;nbsp; cannot find the DaylightFP module that you're attempting to reference seemingly. If it is in the same location, you may have the import incorrect or different, try this here instead as well:&lt;/P&gt;&lt;P&gt;from DaylightFP import DaylightFPx1&lt;/P&gt;&lt;P&gt;Cody&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jan 2025 15:52:02 GMT</pubDate>
    <dc:creator>CodyPatterson</dc:creator>
    <dc:date>2025-01-20T15:52:02Z</dc:date>
    <item>
      <title>Running a Model from A model in Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/running-a-model-from-a-model-in-python/m-p/1577225#M92125</link>
      <description>&lt;P&gt;Trying to run a Model from a Model by exporting to Python. It's been painful so far but I'm close. One last issue. My Model runs ok and when called from a Master Model it also runs fine. BUT when I export a Python file, then edit to make it overwrite (arcpy.env.overwriteOutput = True) and then paste the script in the Python window I get the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# -*- coding: utf-8 -*-&lt;BR /&gt;"""&lt;BR /&gt;Generated by ArcGIS ModelBuilder on : 2025-01-20 10:35:23&lt;BR /&gt;"""&lt;BR /&gt;import arcpy&lt;BR /&gt;from DaylightFP.DaylightFPx1 import DaylightFPx1&lt;/P&gt;&lt;P&gt;def MasterModelFP(): # MasterModelFP&lt;/P&gt;&lt;P&gt;# To allow overwriting outputs change overwriteOutput option to True.&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;main_multipolygons_2_ = "main.multipolygons"&lt;BR /&gt;main_lines_2_ = "main.lines"&lt;/P&gt;&lt;P&gt;# Process: DaylightFPx1 (2) (DaylightFPx1) (DaylightFP)&lt;BR /&gt;World_8_5_32_98_FP_shp_2_ = "D:\\ESRI-Daylight\\NCERTS_1.0\\World_8_5\\World_8_5_32_-98_FP.shp"&lt;BR /&gt;DaylightFPx1(Output_Shapefile=World_8_5_32_98_FP_shp_2_, Input_Polygons=main_multipolygons_2_, Input_Lines=main_lines_2_)&lt;/P&gt;&lt;P&gt;if __name__ == '__main__':&lt;BR /&gt;# Global Environment settings&lt;BR /&gt;with arcpy.EnvManager(scratchWorkspace="C:\\ArcGIS_Scratch\\NXTScratch.gdb", workspace="C:\\ArcGIS_Scratch\\NXTScratch.gdb"):&lt;BR /&gt;MasterModelFP()&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 6, in &amp;lt;module&amp;gt;&lt;BR /&gt;ModuleNotFoundError: No module named 'DaylightFP'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sure it's something very simple but I'm at a loss. Help !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 15:41:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/running-a-model-from-a-model-in-python/m-p/1577225#M92125</guid>
      <dc:creator>TaiDuong</dc:creator>
      <dc:date>2025-01-20T15:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Running a Model from A model in Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/running-a-model-from-a-model-in-python/m-p/1577230#M92126</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/759090"&gt;@TaiDuong&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Python&amp;nbsp; cannot find the DaylightFP module that you're attempting to reference seemingly. If it is in the same location, you may have the import incorrect or different, try this here instead as well:&lt;/P&gt;&lt;P&gt;from DaylightFP import DaylightFPx1&lt;/P&gt;&lt;P&gt;Cody&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 15:52:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/running-a-model-from-a-model-in-python/m-p/1577230#M92126</guid>
      <dc:creator>CodyPatterson</dc:creator>
      <dc:date>2025-01-20T15:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Running a Model from A model in Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/running-a-model-from-a-model-in-python/m-p/1577237#M92128</link>
      <description>&lt;P&gt;If you want to run another model (or script tool) using arcpy, use the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/importtoolbox.htm" target="_self"&gt;Import Toolbox&lt;/A&gt; function to add the model's toolbox, then run it like so:&amp;nbsp;&lt;FONT face="courier new,courier"&gt;arcpy.toolbox_label.ModelName(param1, param2)&lt;/FONT&gt;. Toolbox items aren't accessible as Python modules and trying to call an exported script file directly is possible, but error prone without practice.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 16:26:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/running-a-model-from-a-model-in-python/m-p/1577237#M92128</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2025-01-20T16:26:07Z</dc:date>
    </item>
  </channel>
</rss>

