<?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: beginner command/scripting/python help, 9.3 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351739#M27573</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For v9.3 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcgisscripting&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Create the Geoprocessor object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp = arcgisscripting.create()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Copy Feature Class of cache features(2)...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.FeatureClassToFeatureClass_conversion(TRANSPORTATION_RDCL_SDE, Transportation_gdb, "RDCL_SDE_COPY", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This shows you have to initiate the gp object and then use it in your geoprocessing methods such as FeatureClassToFeatureClass_conversion.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You should be able to find more 9.3 based python scripting info from the forum threads and you could always google for more links.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Mar 2013 15:54:56 GMT</pubDate>
    <dc:creator>MichaelVolz</dc:creator>
    <dc:date>2013-03-22T15:54:56Z</dc:date>
    <item>
      <title>beginner command/scripting/python help, 9.3</title>
      <link>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351731#M27565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi guys, long time lurker first time poster...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if the information I'm after is already elsewhere, please point me in the right direction if it's faster.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've just started using arcgis 9.3 (no arcinfo) after years of using mapinfo.&amp;nbsp; what I'd like to do is just type my commands in arc much like the command line in mapinfo; sql commands for one would be amazing.&amp;nbsp; this doesn't seem apparent in arcgis 9.3 but I could be wrong.&amp;nbsp; I see the command line window but I'm not familiar with the syntax or functions found therein yet.&amp;nbsp; what I used to do in mapinfo was write code in mapbasic, then run those mapbasic programs in mapinfo; can something similar be done here?&amp;nbsp; if python is what I need to learn I don't mind, it's the linking of a working python script (and validation/compilation of that script) to arcmap9.3 that concerns me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;my first task is to compare two point layers for example; find the 5 closest points in layer1 for each point in layer2 in ascending order (ie. ignoring the 6th closest point or farther); any good starting points or things to consider first?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks very much in advance for any input...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cj&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 18:17:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351731#M27565</guid>
      <dc:creator>ChrisJ</dc:creator>
      <dc:date>2013-03-21T18:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: beginner command/scripting/python help, 9.3</title>
      <link>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351732#M27566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it possible for you to upgrade to 10.0 or 10.1?&amp;nbsp; Python has more functionality than in 9.3.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 18:26:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351732#M27566</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-03-21T18:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: beginner command/scripting/python help, 9.3</title>
      <link>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351733#M27567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If python is what I need to learn I don't mind, it's the linking of a working python script (and validation/compilation of that script) to arcmap9.3 that concerns me.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The command window in ArcGIS 9.3 is replaced with a real-live Python prompt "&amp;gt;&amp;gt;&amp;gt;" window in ArcGIS 10.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In 10.0, the geoprocessor (gp) is still there and even deprecated tools and are still available if you crank up a geoprocessing object the 9.3 way (arcgisscripting.Create(9.3)). If you have a working Python script in 9.3, it will run without modification in 10.0. Updating 9.3 scripts to use 10.0 arcpy is not too difficult - except for spatial analyst, which involves learning "the new way to do it" with Python map algebra.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;my first task is to compare two point layers for example; find the 5 closest points in layer1 for each point in layer2 in ascending order (ie. ignoring the 6th closest point or farther); any good starting points or things to consider first?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The easy way to do this (the Point Distance tool) requires ArcGIS Advanced (formerly ArcInfo). Join By Location if you are limited to ArcGIS Basic (formerly ArcView).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Python scripts are linked to ArcGIS Desktop by way of creating a toolbox and adding scripts and models. Toolboxes, script tools, and ModelBuilder models (mostly) run unmodified in 10.0.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 18:27:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351733#M27567</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-03-21T18:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: beginner command/scripting/python help, 9.3</title>
      <link>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351734#M27568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thankyou both for your quick responses...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for the time being I expect to have arcgis 9.3 only, though with arcinfo capability.&amp;nbsp; as I said I'm coming from a mapinfo background so please excuse if I name something incorrectly or misunderstand an analogue between them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;perhaps my task can give you some insight into where I should post this, quickly...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;point layer1 has say 10 points&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;point layer2 has say 100 points spread over the same area as layer1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;what I want is to know the five closest points from layer2 for each point in layer1...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for each layer1.obj, i &amp;lt;=5, i++&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; find next closest layer2.obj&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;end loop&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;results would be something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;layer1 item1 (1,2,3,4,5 closest points from layer2 and their distances)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;layer1 item2 (1,2,3,4,5 closest points from layer2 and their distances)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;layer1 item10 (1,2,3,4,5 closest points from layer2 and their distances)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;with admittedly whimsical syntax that is what i'm picturing; if someone could translate that into an arc environment I'd be very grateful, or point me to the proper forum....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cj&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 19:31:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351734#M27568</guid>
      <dc:creator>ChrisJ</dc:creator>
      <dc:date>2013-03-21T19:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: beginner command/scripting/python help, 9.3</title>
      <link>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351735#M27569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;for the time being I expect to have arcgis 9.3 only, though with arcinfo capability.&amp;nbsp; &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In that case, try the Point Distance tool. The output will give you something you can easily manipulate to get what you want.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 22:07:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351735#M27569</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-03-21T22:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: beginner command/scripting/python help, 9.3</title>
      <link>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351736#M27570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks for this; I've found the PD tool and can see the output....if you or someone has time; what's the best approach for a beginner to take to get this sort of thing automated, ie. a script, and one with more detail (ie. a for loop and that type of control), is this possible in arcgis9.3?&amp;nbsp; again if it helps someone make a link for me; I'm quite used to mapinfo and its mapbasic files, and command line control (including SQL)...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks again curtvprice and all...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cj&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 11:46:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351736#M27570</guid>
      <dc:creator>ChrisJ</dc:creator>
      <dc:date>2013-03-22T11:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: beginner command/scripting/python help, 9.3</title>
      <link>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351737#M27571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's the Help for 10.0 for the Point Distance Tool&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00080000001r000000"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00080000001r000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sample from this page&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Description: Finds distance of each near point from each input point and outputs to a table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# import system modules&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy - You would need to reference gp object in 9.3 instead of newer arcpy object (same thing goes for all other references to arcpy in this sample script)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# set workspace environment&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.workspace = "C:/data/pointdistance.gdb"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# set variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in_features = "police_stations"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;near_features = "crime_location"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;out_table = "crime_distance4"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;search_radius = "22000 Feet"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # find crime locations within the search radius&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.PointDistance_analysis(in_features, near_features, out_table, search_radius)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;except arcpy.ExecuteError:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages(2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;except Exception as ex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print ex.args[0]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 12:58:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351737#M27571</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-03-22T12:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: beginner command/scripting/python help, 9.3</title>
      <link>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351738#M27572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;appreciate it, thanks for the link mvolz47...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;edit: thanks again, though I'm stuck with 9.3 for the time being, so this link may not be for me just yet...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 13:02:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351738#M27572</guid>
      <dc:creator>ChrisJ</dc:creator>
      <dc:date>2013-03-22T13:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: beginner command/scripting/python help, 9.3</title>
      <link>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351739#M27573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For v9.3 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcgisscripting&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Create the Geoprocessor object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp = arcgisscripting.create()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Copy Feature Class of cache features(2)...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.FeatureClassToFeatureClass_conversion(TRANSPORTATION_RDCL_SDE, Transportation_gdb, "RDCL_SDE_COPY", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This shows you have to initiate the gp object and then use it in your geoprocessing methods such as FeatureClassToFeatureClass_conversion.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You should be able to find more 9.3 based python scripting info from the forum threads and you could always google for more links.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 15:54:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351739#M27573</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-03-22T15:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: beginner command/scripting/python help, 9.3</title>
      <link>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351740#M27574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'll give this a try, thanks for your help mvolz47...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;edit: was very helpful, after a bit of tinkering comes back with no errors and some results.&amp;nbsp; this was run:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcgisscripting&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# create the geoprocessor object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp = arcgisscripting.create(9.3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.workspace = "I:\PDtest"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# process&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.PointDistance_analysis("stores.shp", "competitors.shp", "output.dbf", "1000 meters")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;however, all point distances were returned, not only those within 1000m?&amp;nbsp; it's fine for now but I'll need to figure out why that might be; I admit I'm unsure about how projections work here in arc (as opposed to mapinfo).&amp;nbsp; distances in output were reported in decimal degrees by the look of it; next steps?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would also like to be able to run pointdistance and only find those first 5 closest to each point, which I guess with some tinkering in the python script can be done?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cj&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 16:16:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/beginner-command-scripting-python-help-9-3/m-p/351740#M27574</guid>
      <dc:creator>ChrisJ</dc:creator>
      <dc:date>2013-03-22T16:16:38Z</dc:date>
    </item>
  </channel>
</rss>

