<?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: Import Python script to model in ARCMap in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644984#M50271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try adding the following line to your python script.&amp;nbsp; You will to add this after the 'import arcpy' line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14456160593927678 jive_text_macro" data-renderedposition="50_8_912_16" jivemacro_uid="_14456160593927678"&gt;&lt;P&gt;arcpy.env.overwriteOutput = 1&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will allow the script to overwrite output if it already exists.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Oct 2015 16:01:13 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2015-10-23T16:01:13Z</dc:date>
    <item>
      <title>Import Python script to model in ARCMap</title>
      <link>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644980#M50267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a model I built in ArcMap.&amp;nbsp; I exported it to a python script and made some changes.&amp;nbsp; Can I import this python script back into model builder?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 14:37:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644980#M50267</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2015-10-23T14:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Import Python script to model in ARCMap</title>
      <link>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644981#M50268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Terry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, this is possible:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/modelbuilder/integrating-scripts-within-a-model.htm" title="http://desktop.arcgis.com/en/desktop/latest/analyze/modelbuilder/integrating-scripts-within-a-model.htm"&gt;Integrating scripts within a model—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 15:35:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644981#M50268</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2015-10-23T15:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Import Python script to model in ARCMap</title>
      <link>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644982#M50269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jake,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I add the script to the model and run it, it gives the following error..&amp;nbsp; What I don't understand is that when I run the model before exporting it to the python script it does not hang on the LocateFeaturesAlongRoute.&amp;nbsp; Is there a different syntax in python for this?&amp;nbsp; The input is a line and a table and the output is a point..&amp;nbsp; Here is the error I get.. Its not even getting to the code that I made changes to..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 15:48:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644982#M50269</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2015-10-23T15:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Import Python script to model in ARCMap</title>
      <link>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644983#M50270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My first try I created a Python toolbox and received the same error message..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 15:55:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644983#M50270</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2015-10-23T15:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Import Python script to model in ARCMap</title>
      <link>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644984#M50271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try adding the following line to your python script.&amp;nbsp; You will to add this after the 'import arcpy' line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14456160593927678 jive_text_macro" data-renderedposition="50_8_912_16" jivemacro_uid="_14456160593927678"&gt;&lt;P&gt;arcpy.env.overwriteOutput = 1&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will allow the script to overwrite output if it already exists.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 16:01:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644984#M50271</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2015-10-23T16:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Import Python script to model in ARCMap</title>
      <link>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644985#M50272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jake, well I was rooting for your Eagles last night, cant stand Carolina..&amp;nbsp; I entered that line of code but still get this attached error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2015 13:33:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644985#M50272</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2015-10-26T13:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Import Python script to model in ARCMap</title>
      <link>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644986#M50273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;overwriteoutput doesn't work in a number of hard to nail down cases, but your error says that the first point already exists and it appears to be of the wrong type(?).&amp;nbsp; You might try it after a manual delete and restart of arcmap to see if that is the problem.&amp;nbsp; If it is remnant data you may have to use Delete_management to delete stuff that already exists&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2015 17:39:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644986#M50273</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-10-26T17:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Import Python script to model in ARCMap</title>
      <link>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644987#M50274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my experience, the most common situation where overwrite output does not work is if you have an active layer in memory (say in ArcMap) pointing to a dataset that you are trying to overwrite with your script - and the layer is not a parameter, so the script doesn't "know about" the layer well enough to zap the file lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My guess is when you are running in ModelBuilder your model elements are pointing to ArcMap layers so the delete works. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2015 21:58:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644987#M50274</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-10-26T21:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Import Python script to model in ARCMap</title>
      <link>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644988#M50275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;seems to clear memory now but still get this error..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The type of out_event_properties does not match the type of in_features.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 16:21:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-python-script-to-model-in-arcmap/m-p/644988#M50275</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2015-10-27T16:21:17Z</dc:date>
    </item>
  </channel>
</rss>

