<?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 Run Python Script from Model Builder outside Arcmap in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/run-python-script-from-model-builder-outside/m-p/471860#M36855</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have created a model builder that appends a Query Layer (view) in the SDE to an existing featureclass an this process works &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in Arcmap fine. However when I run the script out side arcmap I receive the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000338: Inputs must be either all Feature Classes, Tables or Rasters; not mixed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (Append)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any Suggestions or workarounds to have this run outside Arcmap?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jan 2014 14:25:00 GMT</pubDate>
    <dc:creator>TylerScott2</dc:creator>
    <dc:date>2014-01-10T14:25:00Z</dc:date>
    <item>
      <title>Run Python Script from Model Builder outside Arcmap</title>
      <link>https://community.esri.com/t5/python-questions/run-python-script-from-model-builder-outside/m-p/471860#M36855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have created a model builder that appends a Query Layer (view) in the SDE to an existing featureclass an this process works &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in Arcmap fine. However when I run the script out side arcmap I receive the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000338: Inputs must be either all Feature Classes, Tables or Rasters; not mixed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (Append)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any Suggestions or workarounds to have this run outside Arcmap?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 14:25:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/run-python-script-from-model-builder-outside/m-p/471860#M36855</guid>
      <dc:creator>TylerScott2</dc:creator>
      <dc:date>2014-01-10T14:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python Script from Model Builder outside Arcmap</title>
      <link>https://community.esri.com/t5/python-questions/run-python-script-from-model-builder-outside/m-p/471861#M36856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you post the code to the forum, removing any names that might be confidential?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 14:35:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/run-python-script-from-model-builder-outside/m-p/471861#M36856</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2014-01-10T14:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python Script from Model Builder outside Arcmap</title>
      <link>https://community.esri.com/t5/python-questions/run-python-script-from-model-builder-outside/m-p/471862#M36857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;# ---------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set the necessary product code&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# import arcinfo&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Import arcpy module&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Script arguments&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AVL_DBO_Citation_Archive = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if AVL_DBO_Citation_Archive == '#' or not AVL_DBO_Citation_Archive:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AVL_DBO_Citation_Archive = "Database Connections\\AVL.sde\\AVL.DBO.Citation_Archive" # provide a default value if unspecified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AVL_DBO_Citation_Archive__2_ = arcpy.GetParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if AVL_DBO_Citation_Archive__2_ == '#' or not AVL_DBO_Citation_Archive__2_:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AVL_DBO_Citation_Archive__2_ = "Database Connections\\AVL.sde\\AVL.DBO.Citation_Archive" # provide a default value if unspecified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AVL_DBO_Citation_Archive__3_ = arcpy.GetParameterAsText(2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if AVL_DBO_Citation_Archive__3_ == '#' or not AVL_DBO_Citation_Archive__3_:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AVL_DBO_Citation_Archive__3_ = "Database Connections\\AVL.sde\\AVL.DBO.Citation_Archive" # provide a default value if unspecified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AVL_DBO_Citation_Archive__4_ = arcpy.GetParameterAsText(3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if AVL_DBO_Citation_Archive__4_ == '#' or not AVL_DBO_Citation_Archive__4_:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AVL_DBO_Citation_Archive__4_ = "Database Connections\\AVL.sde\\AVL.DBO.Citation_Archive" # provide a default value if unspecified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CURRENT_CITATIONS = arcpy.GetParameterAsText(4)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if CURRENT_CITATIONS == '#' or not CURRENT_CITATIONS:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CURRENT_CITATIONS = "CURRENT CITATIONS" # provide a default value if unspecified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Local variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Append&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Append_management("'CURRENT CITATIONS'", AVL_DBO_Citation_Archive, "NO_TEST", "Equip_No \"Equip_No\" true true false 10 Text 0 0 ,First,#,CURRENT CITATIONS,Equip_No,-1,-1;RadioCode \"RadioCode\" true true false 10 Text 0 0 ,First,#,CURRENT CITATIONS,RadioCode,-1,-1;WorkDateTime \"WorkDateTime\" true true false 36 Date 0 0 ,First,#,CURRENT CITATIONS,WorkDateTime,-1,-1;Notes \"Notes\" true true false 40 Text 0 0 ,First,#,CURRENT CITATIONS,Notes,-1,-1", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Delete Identical&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.DeleteIdentical_management(AVL_DBO_Citation_Archive__2_, "WorkDateTime", "", "0")&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 14:51:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/run-python-script-from-model-builder-outside/m-p/471862#M36857</guid>
      <dc:creator>TylerScott2</dc:creator>
      <dc:date>2014-01-10T14:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python Script from Model Builder outside Arcmap</title>
      <link>https://community.esri.com/t5/python-questions/run-python-script-from-model-builder-outside/m-p/471863#M36858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, ArcMap 10.2.1&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 14:55:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/run-python-script-from-model-builder-outside/m-p/471863#M36858</guid>
      <dc:creator>TylerScott2</dc:creator>
      <dc:date>2014-01-10T14:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python Script from Model Builder outside Arcmap</title>
      <link>https://community.esri.com/t5/python-questions/run-python-script-from-model-builder-outside/m-p/471864#M36859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I adjusted the model per you suggestion and I received the following error outside Arcmap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000732: Input Features: Dataset CURRENT CITATIONS does not exist or is not supported&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (FeatureClassToFeatureClass&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Current Citations is a (SDE View)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Model runs in arcmap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set the necessary product code&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# import arcinfo&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Import arcpy module&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Script arguments&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AVL_DBO_Current_Citations = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if AVL_DBO_Current_Citations == '#' or not AVL_DBO_Current_Citations:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AVL_DBO_Current_Citations = "Database Connections\\AVL.sde\\AVL.DBO.Current_Citations" # provide a default value if unspecified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AVL_sde = arcpy.GetParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if AVL_sde == '#' or not AVL_sde:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AVL_sde = "Database Connections\\AVL.sde" # provide a default value if unspecified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CURRENT_CITATIONS = arcpy.GetParameterAsText(2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if CURRENT_CITATIONS == '#' or not CURRENT_CITATIONS:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CURRENT_CITATIONS = "CURRENT CITATIONS" # provide a default value if unspecified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HISTORIC_CITATIONS = arcpy.GetParameterAsText(3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if HISTORIC_CITATIONS == '#' or not HISTORIC_CITATIONS:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HISTORIC_CITATIONS = "HISTORIC CITATIONS" # provide a default value if unspecified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HISTORIC_CITATIONS__5_ = arcpy.GetParameterAsText(4)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if HISTORIC_CITATIONS__5_ == '#' or not HISTORIC_CITATIONS__5_:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HISTORIC_CITATIONS__5_ = "HISTORIC CITATIONS" # provide a default value if unspecified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HISTORIC_CITATIONS__3_ = arcpy.GetParameterAsText(5)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if HISTORIC_CITATIONS__3_ == '#' or not HISTORIC_CITATIONS__3_:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HISTORIC_CITATIONS__3_ = "HISTORIC CITATIONS" # provide a default value if unspecified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HISTORIC_CITATIONS__4_ = arcpy.GetParameterAsText(6)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if HISTORIC_CITATIONS__4_ == '#' or not HISTORIC_CITATIONS__4_:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HISTORIC_CITATIONS__4_ = "HISTORIC CITATIONS" # provide a default value if unspecified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CURRENT_CITATIONS__2_ = arcpy.GetParameterAsText(7)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if CURRENT_CITATIONS__2_ == '#' or not CURRENT_CITATIONS__2_:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CURRENT_CITATIONS__2_ = "CURRENT CITATIONS" # provide a default value if unspecified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Local variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Feature Class to Feature Class&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.FeatureClassToFeatureClass_conversion(CURRENT_CITATIONS, AVL_sde, "Current_Citations", "", "Equip_No \"Equip_No\" true true false 10 Text 0 0 ,First,#,CURRENT CITATIONS,Equip_No,-1,-1;RadioCode \"RadioCode\" true true false 10 Text 0 0 ,First,#,CURRENT CITATIONS,RadioCode,-1,-1;WorkDateTime \"WorkDateTime\" true true false 36 Date 0 0 ,First,#,CURRENT CITATIONS,WorkDateTime,-1,-1;Notes \"Notes\" true true false 40 Text 0 0 ,First,#,CURRENT CITATIONS,Notes,-1,-1", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Append&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Append_management("'CURRENT CITATIONS'", HISTORIC_CITATIONS, "NO_TEST", "Equip_No \"Equip_No\" true true false 10 Text 0 0 ,First,#,CURRENT CITATIONS,Equip_No,-1,-1;RadioCode \"RadioCode\" true true false 10 Text 0 0 ,First,#,CURRENT CITATIONS,RadioCode,-1,-1;WorkDateTime \"WorkDateTime\" true true false 36 Date 0 0 ,First,#,CURRENT CITATIONS,WorkDateTime,-1,-1;Notes \"Notes\" true true false 40 Text 0 0 ,First,#,CURRENT CITATIONS,Notes,-1,-1", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Delete Identical&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.DeleteIdentical_management(HISTORIC_CITATIONS__3_, "WorkDateTime", "", "0")&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 15:14:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/run-python-script-from-model-builder-outside/m-p/471864#M36859</guid>
      <dc:creator>TylerScott2</dc:creator>
      <dc:date>2014-01-10T15:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python Script from Model Builder outside Arcmap</title>
      <link>https://community.esri.com/t5/python-questions/run-python-script-from-model-builder-outside/m-p/471865#M36860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you get a print out of what the HISTORIC_CITATIONS variable contains in your append statement?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 15:27:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/run-python-script-from-model-builder-outside/m-p/471865#M36860</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2014-01-10T15:27:06Z</dc:date>
    </item>
  </channel>
</rss>

