<?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: Model Builder to Python: Batch Mode in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40106#M3200</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think where you have strings like&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;"tableName_tmp1.shp"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You want to use&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;tableName_tmp1&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jun 2012 16:55:52 GMT</pubDate>
    <dc:creator>MathewCoyle</dc:creator>
    <dc:date>2012-06-07T16:55:52Z</dc:date>
    <item>
      <title>Model Builder to Python: Batch Mode</title>
      <link>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40100#M3194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I created a model using model builder, and have exported it as a python script. What I am trying to do, by using the for loop, is have it run in batch mode for a series of .txt files that are tables. I am trying to have it so that the end result its 2 separate shape files, one that has been created for the starting latlon, and the other for the endlatlon (with the values all coming from 4 separate columns in the .txt file). I have run into a lot of difficulties trying to create a python script that will run in batch mode ... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am very new to python (as I'm sure you are able to tell by the code), and would appreciate any feedback as to how to use this model that has been exported from model builder by using python and running in batch mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank-you&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; # Import system modules import sys, string, os, arcgisscripting&amp;nbsp; # Create the Geoprocessor object gp = arcgisscripting.create(9.3)&amp;nbsp;&amp;nbsp; # Load required toolboxes... gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")&amp;nbsp; # Allows geoprocessing tools to overwrite the output if it already exists. gp.OverWriteOutput = True&amp;nbsp; # Set the Environment Variables gp.Workspace = r"C:\TST_Folder"&amp;nbsp; # List the .txt file input tables table = gp.ListTables("*txt")&amp;nbsp; try: &amp;nbsp;&amp;nbsp;&amp;nbsp; # For each .txt table found in the Workspace, perform the following series of tasks for each .txt file&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for table in Workspace:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Removes the file extension &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableName = table[:-4]&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Reports which table is being processed &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.addmessage("Processing table" + str(tableName)) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Make XY Event Layer (E_LATLON)...Save file as the tableName with tmp1 as the suffix &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.MakeXYEventLayer_management(tableName, "LON", "LAT", tableName + (str(tmp1)), "GEOGCS['GCS_WGS_1984',DATUM")&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Copy Features (E_LATLON)...Save file as the tableName with tmp1 as the suffix &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CopyFeatures_management(tableName + (str(tmp1)), tableName + (str(tmp1.shp)), "", "0", "0", "0")&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Project (E_LATLON)...Save file as the tableName with _e as the suffix &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Project_management(tableName + (str(tmp1.shp)), tableName + (str(_e.shp)), "PROJCS['LCC'])&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Add Field onto(E_LATLON)...&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddField_management(tableName + (str(_e.shp)), "Title", "FLOAT", "6", "4", "", "", "NON_NULLABLE", "NON_REQUIRED", "")&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Calculate Field onto (E_LATLON)...&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CalculateField_management(tableName_e.shp, "Title", "Sqr ( X^2 )", "VB", "")&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Make XY Event Layer (S_LATLON)... Save file as the tableName with tmp as the suffix &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.MakeXYEventLayer_management(tableName, "sLon", "sLat", tableName_tmp, "GEOGCS['GCS_WGS_1984',DATUM")&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Copy Features (S_LATLON)... Save file as the tableName with tmp as the suffix&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CopyFeatures_management(tableName + (str(tmp)), tableName + (str(tmp.shp)), "", "0", "0", "0")&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Project (S_LATLON)... Save file as the tableName with _s as the suffix &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Project_management(tableName_tmp.shp, tableName + (str(_s.shp)), "PROJCS['LCC'])&amp;nbsp; except: &amp;nbsp;&amp;nbsp;&amp;nbsp; #If an error occurred while running the script, then print the messages &amp;nbsp;&amp;nbsp;&amp;nbsp; print gp.GetMessages()&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 22:52:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40100#M3194</guid>
      <dc:creator>LarissaPizzolato</dc:creator>
      <dc:date>2012-06-06T22:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder to Python: Batch Mode</title>
      <link>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40101#M3195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, for one, you are not really looping an iteratable object.&amp;nbsp; (for table in Workspace: )&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Set the Environment Variables
gp.Workspace = r"C:\TST_Folder"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #### &amp;lt; THIS IS A GP VARIABLE

# List the .txt file input tables
table = gp.ListTables("*txt")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #### &amp;lt; THIS IS THE LIST YOU SHOULD ITTERATE

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; # For each .txt table found in the Workspace, perform the following series of tasks for each .txt file 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for table in Workspace:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #### Workspace CANNOT BE ITTERATED, and YOU ARE REASSIGNING table

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Removes the file extension
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableName = table[:-4]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #### IN VIEW OF THE LINE ABOVE, THIS MAKES NO SENSE
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #### IF table WAS STILL A LIST, YOU WOULD BE CHOPPING OFF THE LAST FOUR ITEMS

&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;What you want is something more like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Set the Environment Variables
gp.Workspace = r"C:\TST_Folder"

# List the .txt file input tables
table = gp.ListTables("*txt")

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; for t in table: 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Removes the file extension
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableName = t[:-4]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Reports which table is being processed
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.addmessage("Processing table" + str(tableName))
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:33:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40101#M3195</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2021-12-10T21:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder to Python: Batch Mode</title>
      <link>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40102#M3196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's not safe anymore to assume that a file extension has exactly 3 characters&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import os
tableName = os.path.splitext(table)[0]&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:33:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40102#M3196</guid>
      <dc:creator>BruceNielsen</dc:creator>
      <dc:date>2021-12-10T21:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder to Python: Batch Mode</title>
      <link>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40103#M3197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I changed the code as follows, now I am getting a tab/space error... I have de-dented all of the code, and re-indented it. I have even tried the untabify region with no success. Is there anything else could be causing this problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, I am unsure as to how to name the output files at the individual steps within the for loop ... it seems that this might be the cause of the problem? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# List the .txt file input tables
table = gp.ListTables("*txt")
print table

try:
 for t in list(table):
&amp;nbsp; # Removes the file extension
&amp;nbsp; tableName = os.path.splitext(t)[0]
&amp;nbsp; # Reports which table is being processed
&amp;nbsp; gp.addmessage("Processing table" + str(tableName))
&amp;nbsp; # Process: Make XY Event Layer (endLatLon)...
&amp;nbsp; gp.MakeXYEventLayer_management(tableName, "eLon", "eLat", tableName + (str(_tmp1)), "Coordinate System")
&amp;nbsp; # Process: Copy Features (endLatLon)...
&amp;nbsp; gp.CopyFeatures_management(tableName_tmp1), tableName + (str(_tmp1a)), "", "0", "0", "0")
&amp;nbsp; # Process: Project (endLatLon)...
&amp;nbsp; gp.Project_management(tableName_tmp1a, tableName + (str(_e.shp)), "PROJCS['LCC')]")
&amp;nbsp; # Process: Add Field onto(endLatLon)...
&amp;nbsp; gp.AddField_management(tableName_e.shp), "Vari", "FLOAT", "3", "2", "", "", "NON_NULLABLE", "NON_REQUIRED", "")
&amp;nbsp; # Process: Calculate Field onto (endLatLon)...
&amp;nbsp; gp.CalculateField_management(tableName_e.shp, "Vari", "Sqr ( x^2 )", "VB", "")
&amp;nbsp; # Process: Make XY Event Layer (startLatLon)...
&amp;nbsp; gp.MakeXYEventLayer_management(tableName, "sLon", "sLat", tableName + (str(_tmp)), "Coordinate System")
&amp;nbsp; # Process: Copy Features (startLatLon)...
&amp;nbsp; gp.CopyFeatures_management(tableName_tmp), tableName + (str(_tmpa)), "", "0", "0", "0")
&amp;nbsp; # Process: Project (startLatLon)...
&amp;nbsp; gp.Project_management(tableName_tmpa.shp, tableName + (str(_s.shp)), "PROJCS['LCC')]")
except:
 #If an error occurred while running the script, then print the messages
 print gp.GetMessages()&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:33:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40103#M3197</guid>
      <dc:creator>LarissaPizzolato</dc:creator>
      <dc:date>2021-12-10T21:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder to Python: Batch Mode</title>
      <link>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40104#M3198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have a bunch of brackets missing (or extra), that's probably the reason for the interpreter not being able to untabify properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, all your .shp files need to be in string quotes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eg. tableName_e.shp &amp;gt; "tableName_e.shp"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 13:13:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40104#M3198</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-06-07T13:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder to Python: Batch Mode</title>
      <link>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40105#M3199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello again, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I run the script, I recieved this error: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute. Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000732: Input Features: Dataset tableName_tmp1.shp does not exist or is not supported&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (CopyFeatures).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to solve it by adding the local variables (similar to the original model that was exported from Model Builder), but that didn't seem to work ... any suggestions as to where I am going wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# List the .txt file input tables
table = gp.ListTables("*txt")
print table

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; for t in list(table):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Removes the file extension
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableName = os.path.splitext(t)[0]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Reports which table is being processed
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.addmessage("Processing table" + str(tableName))

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Local variables...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableName_tmp = tableName + str("_tmp")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableName_tmp1 = tableName + str("_tmp1")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableName_e = tableName + str("_e.shp")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableName_tmp1A = tableName + str("_tmp1A.shp")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableName_s = tableName + str("_s.shp")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableName_tmpA = tableName + str("_tmpA.shp")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Make XY Event Layer (endLatLon)...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.MakeXYEventLayer_management(t, "eLon", "eLat", tableName_tmp1, "GeographicCoordinates")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Copy Features (endLatLon)...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CopyFeatures_management("tableName_tmp1.shp", tableName_tmp1A, "", "0", "0", "0")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Project (endLatLon)...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Project_management("tableName_tmp1A.shp", tableName_e, "ProjectedCoordinates")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Add Field onto(endLatLon)...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddField_management("tableName_e.shp", "Vel_Value", "FLOAT", "6", "4", "", "", "NON_NULLABLE", "NON_REQUIRED", "")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Calculate Field onto (endLatLon)...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CalculateField_management("tableName_e.shp", "Vel_Value", "x^2 ", "VB", "")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Make XY Event Layer (startLatLon)...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.MakeXYEventLayer_management(tableName, "sLon", "sLat", tableName_tmp, "GeographicCoordinates")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Copy Features (startLatLon)...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CopyFeatures_management("tableName_tmp.shp", tableName_tmpA, "", "0", "0", "0")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Project (startLatLon)...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Project_management("tableName_tmpA.shp", tableName_s, "ProjectedCoordinates")
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; #If an error occurred while running the script, then print the messages
&amp;nbsp;&amp;nbsp;&amp;nbsp; print gp.GetMessages()&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:33:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40105#M3199</guid>
      <dc:creator>LarissaPizzolato</dc:creator>
      <dc:date>2021-12-10T21:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder to Python: Batch Mode</title>
      <link>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40106#M3200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think where you have strings like&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;"tableName_tmp1.shp"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You want to use&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;tableName_tmp1&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 16:55:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40106#M3200</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-06-07T16:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder to Python: Batch Mode</title>
      <link>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40107#M3201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank-you Everyone! I've finally got it working now!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 17:57:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/model-builder-to-python-batch-mode/m-p/40107#M3201</guid>
      <dc:creator>LarissaPizzolato</dc:creator>
      <dc:date>2012-06-07T17:57:03Z</dc:date>
    </item>
  </channel>
</rss>

