<?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: Python Final Project Assistance XY points from table to final IDW raster in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50460#M3972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm having a lot of trouble getting the parameters as text. For some resone the arcpy.env.workspace is not defined everytime I run. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, os &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ws_in = arcpy.GetParameter(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ws_out = arcpy.GetParameter(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.workspace = ws_in&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.overwriteOutput = True&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;tables = arcpy.ListTables()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Sets local variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;xc = "long"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;yc = "lat"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;spref = arcpy.SpatialReference(4326)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;XYeventname = "measurements"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Loops through the table and makes points which are saved to the output location&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for tbl in tables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeXYEventLayer_management(tbl, xc, yc, XYeventname, spref)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclass = os.path.join(ws_out, tbl.strip(".dbf"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(XYeventname, fclass)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Mar 2014 22:36:22 GMT</pubDate>
    <dc:creator>annesanta_maria2</dc:creator>
    <dc:date>2014-03-10T22:36:22Z</dc:date>
    <item>
      <title>Python Final Project Assistance XY points from table to final IDW raster</title>
      <link>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50455#M3967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am taking an independent study python class and the professor is just learning python as well. For my final project I want to do the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. add xy data from several tables-Make XY events layer-using WGS84 spatial reference&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. convert that data to a permanent shapefile- copy features&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. take those points and list fields-arcpy.listfields&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. run IDW across several fields for all the points&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can run that process for one set of data from table to IDW raster but I cannot seem to figure out how to turn that into a code that automates twenty tables and many fields in those points layers. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions on how to start? Essentially I need a script that I can turn into a toolbox for a final project in April. I thought I had this under control until I realized how hard it is for me to grasp python. I am just learning and I DON'T WANT SOMEONE JUST TO TELL ME HOW to do it. I want to really understand. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# set workspace &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env. workspace ="whatever the workspace would be C:/user/etc"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tablelist = arcpy.Listtables() &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.....# this is where I get stuck how do take this table list and turn into into several events layers. Do I need to list all the fields in the table.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for tables table list:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeXYEvents layers(enter parameters)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CopyFeatures&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess what I am looking for is the best next step to take. I appreciate any assistance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Feb 2014 19:04:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50455#M3967</guid>
      <dc:creator>annesanta_maria2</dc:creator>
      <dc:date>2014-02-15T19:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Python Final Project Assistance XY points from table to final IDW raster</title>
      <link>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50456#M3968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Anne,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good for you that want to understand the Python code that solves your problem. In order to give you some pointers, it is necessary to know a little more:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;what version of ArcGIS are you using?&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;do you have any programming knowledge?&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;STRONG&gt;About Python&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;In case you don't have (much) experience with Python, consider the next resources:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The thread below provides some useful links to resources:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/96424-Learning-Python"&gt;http://forums.arcgis.com/threads/96424-Learning-Python&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A good way to start can be using the &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//002100000017000000"&gt;Python window&lt;/A&gt;&lt;SPAN&gt; in ArcGIS, since you obtain context sensitive Help. Also after you manually execute a ArcGIS tool, you can use the option &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Copy as Python Snippet&lt;/SPAN&gt;&lt;SPAN&gt; in the &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//002100000013000000"&gt;Results window&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When working with looping through feature classes and tables, have a look at cursors (especially the data access cursors): &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//002z0000001q000000"&gt;Accessing data using cursors&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And you can follow free courses online at Esri:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://training.esri.com/gateway/index.cfm?fa=search.results&amp;amp;searchterm=python"&gt;http://training.esri.com/gateway/index.cfm?fa=search.results&amp;amp;searchterm=python&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Depending on your knowledge and needs, there are many options. Also the Forums are a very useful resource. Always look at the posts by jscheirer (Jason Scheirer). He is on the Python team at Esri and also posts on: &lt;/SPAN&gt;&lt;A href="http://arcpy.wordpress.com/"&gt;http://arcpy.wordpress.com/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I heard about the book "&lt;/SPAN&gt;&lt;A href="http://www.packtpub.com/programming-arcgis-10-1-with-python-cookbook/book"&gt;Programming ArcGIS 10.1 with Python&lt;/A&gt;&lt;SPAN&gt;" which appears to be a good resource, and there will be a new one "&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Mastering Python Programming for ArcGIS&lt;/SPAN&gt;&lt;SPAN&gt;".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;About your question&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I assume your post in this threads is related to what you are asking here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/69130-ArcGIS10.0-PythonWindow-Make-XY-Event-Layer-.csv-amp-WGS-1984-Errors-000622-amp-000628?p=366433&amp;amp;viewfull=1#post366433"&gt;http://forums.arcgis.com/threads/69130-ArcGIS10.0-PythonWindow-Make-XY-Event-Layer-.csv-amp-WGS-1984-Errors-000622-amp-000628?p=366433&amp;amp;viewfull=1#post366433&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From this thread I extracted that in your workspace you have a number of DBF tables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;AB10_.dbf, AB11_.dbf, AB15_.dbf, CFHMS_.dbf, CFMHN_.dbf, FA_.dbf, HSFHome_.dbf, HSFVAN_.dbf, KF18_.dbf, KF1W_.dbf, LASA_.dbf, MB_HAck_.dbf, PCM10_.dbf, PMB28_.dbf, pmc9_.dbf, SHROCK_.dbf, simo09_.dbf, SIMO94_.dbf, SP150_.dbf, sp42_.dbf, T13East_.dbf, T13West_.dbf, TB53_.dbf, TB63_.dbf, WSFBOW_.dbf, WSFDALLAS_.dbf&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I assume they all have the the same coordinate fields: "Lat" and "long". Please note that in your code in the other thread you assign the Lat to x and Long to y (&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;it should be the other way around!&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After converting the DBF's to shapefiles, you want to perform inverse distance weighted interpolation on each attribute. What I don't completely understand is whether you want to merge all the tables together first, or whether for each table/shapefile and attribute the IDW should be performed. Main question here is what you want to do with the rasters that result from the operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the table names, it seems that each table covers a different area. Is that right? In that case merging the features would be an option, but if you want to do that, you will have to look at the schema's of the tables (do they have the same fields?). If the schema's are different, you will probably have to use cursors and more programming to do that or some nasty field mapping. I could advise you on that, but will need to have a look at the data first. I don't know if that's an option for you...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please note that looping through each field of a shapefile to perform the IDW will result in more rasters then you want, since your lat and long fields will also be used. You will have to include some more intelligence to do this right.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if I can help you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Xander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 11:48:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50456#M3968</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2014-02-18T11:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Python Final Project Assistance XY points from table to final IDW raster</title>
      <link>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50457#M3969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you so much for your assistance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I am really working on this! I am a grad student and it seems all the jobs post school want python which of course the geography department doesn't teach. So the independent study class is the best option. Right now I am working through Learning Python the Hard Way and the ArcGIS python book. I've attached an example of one of the data sheets I am working with. All of the excel/.dbf files look the same. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The end result of the project will be a custom tool so that you can loop through the tables and create event layers and then copy them to a folder and have feature classes created. I think what I will do is leave the looping out of the IDW, just because of complications and because it is probably better if the people I am working with specify what data they want to do IDW on. If that makes sense. So the end result I am working toward is a tool where "they-the users" specify the location of their table, the tool then loops through the tables and creates points layers. Then they specify which table they want to use and the field they want to use for IDW. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So mainly I am working through looping with the tables and XY events layers. I have fixed the code so that it does work better than it did last time. Here is an example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; env.workspace = "F:/work/python" # once I turn this into a tool it will be changed to GetParameters as text()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; tables = arcpy.ListTables()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; xc = "long"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; yc = "lat"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; out_layer = "F:/work/python" # once I turn this into a tool it will be changed to GetParameters as text()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;spref = 4326 #I did this as the hardcode for WGS 84 but there may be a better way. I am still looking. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; for tbl in tables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeXYEventLayer_management(tbl, xc, yc, out_layer, spref)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;New error which I checked out. Runtime error&amp;nbsp; Traceback (most recent call last):&amp;nbsp;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 2, in &amp;lt;module&amp;gt;&amp;nbsp;&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 6348, in MakeXYEventLayer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e ExecuteError: ERROR 000212: Cannot create XY event source Failed to execute (MakeXYEventLayer) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AND I think it has to do with the coordinate system reference that I am using. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The next step is to do arcpy.CopyFeatures_management(outlayer, savedlayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I really appreciate the help and I think I am getting closer to figuring this out and learning python everyday.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 13:22:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50457#M3969</guid>
      <dc:creator>annesanta_maria2</dc:creator>
      <dc:date>2014-02-19T13:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Python Final Project Assistance XY points from table to final IDW raster</title>
      <link>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50458#M3970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Anne,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Indeed you spatial reference is not defined correctly. Change:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;spref = 4326&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;... into:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;spref = arcpy.SpatialReference(4326)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This creates an actual spatial reference object from the WKID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In case the tables contain the same attributes and represent different contiguous areas, it will be better to merge the points together before you perform the interpolation. Interpolation is, as the name suggests, not an extrapolation. This means that the values at the borders of the raster resulting from the interpolation will not be very reliable. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another thing I notice in your code is the line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;out_layer = "F:/work/python" &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This line of code is pointing to a folder, which in this case is the same folder as the folder that holds the tables. Instead of a folder you should provide a name here, like for instance "measurements". The layer created by this tool is temporary and resides in memory. Within the loop (for tbl in tables) the arcpy.CopyFeatures_management should be executed. This will require a location and name of the output featureclass to be created. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let's assume you would have an input folder with tables and an output folder to store the featureclass. Your code could like something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy, &lt;STRONG&gt;os&lt;/STRONG&gt;
from arcpy import env

ws_in = "F:/work/python" # could use arcpy.GetParameterAsText(0)
ws_out = "F:/work/python/output" # could use arcpy.GetParameterAsText(1)

env.workspace = ws_in
tables = arcpy.ListTables()

xc = "long"
yc = "lat"

spref = arcpy.SpatialReference(4326)

XYeventname = "measurements"

for tbl in tables:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeXYEventLayer_management(tbl, xc, yc, XYeventname, spref)

&amp;nbsp;&amp;nbsp;&amp;nbsp; # assuming you have DBF tables, strip the extension:
&amp;nbsp;&amp;nbsp;&amp;nbsp; fclass = &lt;STRONG&gt;os&lt;/STRONG&gt;.path.join(ws_out, tbl.strip(".dbf"))

&amp;nbsp;&amp;nbsp;&amp;nbsp; # make the featureclass
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(XYeventname, fclass)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the code for each table an XY event layer is created in memory. It will be named "measurements" and this layer is overwritten with each table. Using the os module the output workspace "ws_out" is joined with the table name, although in this case the ".dbf" is stripped from the name. The resulting variable "fclass" contains the path and name to the featureclass to be created. Using the copy features tool, the layer is written to a featureclass. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is important here, is that the variable "fclass" defined what type of output is written. If it references to a name in a folder , it will be a shapefile, but if you are pointing to a name in a file geodatabase, it will create a featureclass in a geodatabase. The reason for not using the same input and output folder, is that a shapefile is created with the same name as the (DBF) table. However, a shapefile consists of a DBF file as well to store the attributes. If you would write the shapefile with the same table name to the same input folder you would get some nasty errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;Another thing is the attached Excel file. If you would work on this it would change things a bit, since when working with Excel files, the Excel file itself is the workspace and worksheets or named data ranges will be the tables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Xander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:56:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50458#M3970</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-10T21:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Python Final Project Assistance XY points from table to final IDW raster</title>
      <link>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50459#M3971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry it took so long to say thank you. After working through the tables and the code I finally got it to run properly without any errors. It was amazing. Thank you. I put together this code for the IDW so that someone can select several different fields from the same table and run IDW on the data for that set of points. It's really crude but it works I suppose. Again I want to thank you for all your help. If you have any suggestions on the stuff at the bottom let me know. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy.sa import *&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CheckOutExtension("Spatial")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;env.workspace = "C:/Users/Anne/Desktop/Python/finalproj"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Set Variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;points = "Export_Output.shp"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;zfield1 = "pH"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;zfield2 = "Pphate"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;zfield3 = "K"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;zfield4 = "CA"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;zfield5 = "Mg"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#First Run&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outidw1 = Idw(points, zfield1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outidw1.save("C:/Users/Anne/Desktop/Python/finalproj/data/outputs/ab10ph")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Second Run&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outidw2 = Idw(points, zfield2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outidw2.save("C:/Users/Anne/Desktop/Python/finalproj/data/outputs/ab10pphate")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Third Run&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outidw3 = Idw(points, zfield3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outidw3.save("C:/Users/Anne/Desktop/Python/finalproj/data/outputs/ab10ll")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Fourth Run&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outidw4 = Idw(points, zfield4)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outidw4.save("C:/Users/Anne/Desktop/Python/finalproj/data/outputs/ab10ca")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Fifth Run&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outidw5 = Idw(points, zfield5)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outidw5.save("C:/Users/Anne/Desktop/Python/finalproj/data/outputs/ab10mg")&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 21:50:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50459#M3971</guid>
      <dc:creator>annesanta_maria2</dc:creator>
      <dc:date>2014-03-10T21:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Python Final Project Assistance XY points from table to final IDW raster</title>
      <link>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50460#M3972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm having a lot of trouble getting the parameters as text. For some resone the arcpy.env.workspace is not defined everytime I run. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, os &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ws_in = arcpy.GetParameter(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ws_out = arcpy.GetParameter(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.workspace = ws_in&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.overwriteOutput = True&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;tables = arcpy.ListTables()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Sets local variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;xc = "long"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;yc = "lat"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;spref = arcpy.SpatialReference(4326)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;XYeventname = "measurements"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Loops through the table and makes points which are saved to the output location&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for tbl in tables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeXYEventLayer_management(tbl, xc, yc, XYeventname, spref)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclass = os.path.join(ws_out, tbl.strip(".dbf"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(XYeventname, fclass)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 22:36:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50460#M3972</guid>
      <dc:creator>annesanta_maria2</dc:creator>
      <dc:date>2014-03-10T22:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Python Final Project Assistance XY points from table to final IDW raster</title>
      <link>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50461#M3973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry. I am having problems getting the parameters when I create the tool. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I added an input and output file for the tool. The input is set up to read workspaces and the output is set up as an output workspace. I get this error. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Users\Anne\Desktop\Python\finalproj\tabletopoint.py", line 29, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclass = os.path.join(ws_out, tbl.strip(".dbf"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Python27\ArcGIS10.1\Lib\ntpath.py", line 96, in join&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; assert len(path) &amp;gt; 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TypeError: object of type 'geoprocessing value object' has no len()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 22:41:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50461#M3973</guid>
      <dc:creator>annesanta_maria2</dc:creator>
      <dc:date>2014-03-10T22:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Python Final Project Assistance XY points from table to final IDW raster</title>
      <link>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50462#M3974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So ignore everything. I figured it out!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 22:44:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50462#M3974</guid>
      <dc:creator>annesanta_maria2</dc:creator>
      <dc:date>2014-03-10T22:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Python Final Project Assistance XY points from table to final IDW raster</title>
      <link>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50463#M3975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;Sorry it took so long to say thank you. After working through the tables and the code I finally got it to run properly without any errors. It was amazing. Thank you. I put together this code for the IDW so that someone can select several different fields from the same table and run IDW on the data for that set of points. It's really crude but it works I suppose. Again I want to thank you for all your help. If you have any suggestions on the stuff at the bottom let me know. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;import arcpy&lt;BR /&gt;from arcpy import env&lt;BR /&gt;from arcpy.sa import *&lt;BR /&gt;&lt;BR /&gt;arcpy.CheckOutExtension("Spatial")&lt;BR /&gt;&lt;BR /&gt;env.workspace = "C:/Users/Anne/Desktop/Python/finalproj"&lt;BR /&gt;&lt;BR /&gt;#Set Variables&lt;BR /&gt;points = "Export_Output.shp"&lt;BR /&gt;zfield1 = "pH"&lt;BR /&gt;zfield2 = "Pphate"&lt;BR /&gt;zfield3 = "K"&lt;BR /&gt;zfield4 = "CA"&lt;BR /&gt;zfield5 = "Mg"&lt;BR /&gt;&lt;BR /&gt;#First Run&lt;BR /&gt;outidw1 = Idw(points, zfield1)&lt;BR /&gt;outidw1.save("C:/Users/Anne/Desktop/Python/finalproj/data/outputs/ab10ph")&lt;BR /&gt;&lt;BR /&gt;#Second Run&lt;BR /&gt;outidw2 = Idw(points, zfield2)&lt;BR /&gt;outidw2.save("C:/Users/Anne/Desktop/Python/finalproj/data/outputs/ab10pphate")&lt;BR /&gt;&lt;BR /&gt;#Third Run&lt;BR /&gt;outidw3 = Idw(points, zfield3)&lt;BR /&gt;outidw3.save("C:/Users/Anne/Desktop/Python/finalproj/data/outputs/ab10ll")&lt;BR /&gt;&lt;BR /&gt;#Fourth Run&lt;BR /&gt;outidw4 = Idw(points, zfield4)&lt;BR /&gt;outidw4.save("C:/Users/Anne/Desktop/Python/finalproj/data/outputs/ab10ca")&lt;BR /&gt;&lt;BR /&gt;#Fifth Run&lt;BR /&gt;outidw5 = Idw(points, zfield5)&lt;BR /&gt;outidw5.save("C:/Users/Anne/Desktop/Python/finalproj/data/outputs/ab10mg")&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Anne,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Glad to hear you worked it out. I would like to tell you something on using dictionaries and looping through data. In your sample where you calculate the IDW for 5 fields, you could have used a dictionary containing the input field names and output raster names.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy, os

arcpy.CheckOutExtension("Spatial")
ws_out = "C:/Users/Anne/Desktop/Python/finalproj/data/outputs"
env.workspace = ws_out # set it to your output workspace
arcpy.env.overwriteOutput = True

#Set Variables
points = "C:/Users/Anne/Desktop/Python/finalproj/Export_Output.shp"

# dictionary with fieldnames and output raster names
d = {'pH': 'ab10ph', 'Pphate': 'ab10pphate', 'K': 'ab10ll',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'CA': 'ab10ca', 'Mg': 'ab10mg'}

# loop through the dictionary
for fieldname, rasname in d.items():
&amp;nbsp;&amp;nbsp;&amp;nbsp; # are you sure you want to accept default cellsize, power and search radius?
&amp;nbsp;&amp;nbsp;&amp;nbsp; outidw = arcpy.sa.Idw(points, fieldname)
&amp;nbsp;&amp;nbsp;&amp;nbsp; outidw.save(rasname) # no path included, so saved to (output) workspace

# return the sa license
arcpy.CheckInExtension("Spatial")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In case you want to use the field name in the output raster name you could a list as well:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;l = ['pH', 'Pphate', 'K', 'CA', 'Mg']
ras_prefix = 'ab10'
for name in l:
&amp;nbsp;&amp;nbsp;&amp;nbsp; outidw = arcpy.sa.Idw(points, name)
&amp;nbsp;&amp;nbsp;&amp;nbsp; outidw.save('{0}{1}'.format(ras_prefix, name))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another thing to remember is that you are not specifying any cellsize, power and search radius settings. If you have your environment settings setup correctly and your points are also located outside your study area, this might give appropriate results. If your area is cutoff (since it will by default take the extent of the points) you may want to define things like &lt;/SPAN&gt;&lt;SPAN style="font-family:courier new;"&gt;arcpy.env.snapRaster&lt;/SPAN&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;SPAN style="font-family:courier new;"&gt;arcpy.env.extent&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Xander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:56:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50463#M3975</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-10T21:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Python Final Project Assistance XY points from table to final IDW raster</title>
      <link>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50464#M3976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmm. Would this be able to be turned into a tool so that the professor could put in any set of points and then specify the fields to be used? (I definitely need to take another class in Python. The ArcGIS book is not entirely helpful, but it isn't bad either). I'm not sure about extents right now and cell size, but I am looking into the data some more to see what the area covered is and how much interpolation they are doing outside points etc. So I am waiting on that, but this is super helpful. I really really appreciate it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, os&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CheckOutExtension("Spatial")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ws_out = #GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;env.workspace = # GetParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.overwriteOutput = True&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Set Variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;points = GetParameterAsText(2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Is there a way to set this up so the fields could be selected from a dropdown list in the actual toolbox. Then those would be used to create a list.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;l = ['pH', 'Pphate', 'K', 'CA', 'Mg']&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ras_prefix = 'ab10'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for name in l:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; outidw = arcpy.sa.Idw(points, name)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; outidw.save('{0}{1}'.format(ras_prefix, name))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# return the sa license&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CheckInExtension("Spatial")&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2014 16:14:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50464#M3976</guid>
      <dc:creator>annesanta_maria2</dc:creator>
      <dc:date>2014-03-11T16:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Python Final Project Assistance XY points from table to final IDW raster</title>
      <link>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50465#M3977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Anne,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That is a relatively simple thing to do with a ArcGIS toolbox tool. I advise you to read the following Help page:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//00150000000n000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.2/index.html#//00150000000n000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you scroll to the very end of this page you will see a header "&lt;/SPAN&gt;&lt;STRONG&gt;obtained from&lt;/STRONG&gt;&lt;SPAN&gt;". This is what it is all about including the "&lt;/SPAN&gt;&lt;STRONG&gt;Filter&lt;/STRONG&gt;&lt;SPAN&gt;" option and multi value setting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Create a new toolbox, add a script (name it appropriately), select the location of the script, and in the next screen you have to define your parameters. In this screen select feature layer as a parameter type (let's call it "point features"). In the Filter option (lowe part of dialog) set it to Feature Class and select only point features. The user will not be able to select a layer that isn't a point featureclass.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The next parameter would be of the type field (let's call this one "IDW fields"). Now in the lower part of the dialog set the following things:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;MultiValue: Yes (this means more than 1 field van be chosen)&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Filter: Field (in the dialoog with field type select only the appropriate field types for IDW: like Float and Double), so only these field will be shown in your script dialog&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Obtained from: select your "point features". This means that the field will be obtained from the point feature layer the user selected&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;SPAN&gt;With a few simple clicks you have set up (part of) the scrip dialog. Now when you read the fields inside the script (arcpy.GetParameter() or arcpy.GetParameterAsText()), I advise you to read is as text. It will be a single string. Split is using the ';' as split character to obtain a list of the field names.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;flds = arcpy.GetParameterAsText(1)
lst_flds = flds.split(';')&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now you have a list of the chosen field names that can be used in the IDW loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See attached images to clarify.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]32136[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;Defining the field parameter&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]32137[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;The result in the script dialog&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Xander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:56:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-final-project-assistance-xy-points-from/m-p/50465#M3977</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-10T21:56:47Z</dc:date>
    </item>
  </channel>
</rss>

