<?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: Converting scripts to arcpy for use in ags 10 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579526#M45451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;increased sensitivity to overwriting in-memory datasets&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;before you may have been able to get away with it but now you need to make sure you have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.overwriteOutput = True&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Dec 2010 19:12:12 GMT</pubDate>
    <dc:creator>KevinGooss</dc:creator>
    <dc:date>2010-12-17T19:12:12Z</dc:date>
    <item>
      <title>Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579522#M45447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is anyone else out there undergoing a conversion project to get python scripts written for 9.3 to work in 10?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm wondering if there is a guide to the common things that need to be changed? If it is absolutely necessary to upgrade to arcpy and what kinds of experiences people have had doing this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to convert about 30 scripts and it's a big job. Besides the find and replace with gp to arcpy I'm finding alot of case sensitive issues like SearchCursors next() method which cannot be Next() like it used to.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now I'm stuck on &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;result1 = arcpy.GetCount_management("TempSelection")
&amp;nbsp;&amp;nbsp;&amp;nbsp; affectedFeatures = int(result1.GetOutput(0))&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the GetOutput call produces an error and I'm trying to work around it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 20:14:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579522#M45447</guid>
      <dc:creator>KevinGooss</dc:creator>
      <dc:date>2010-12-14T20:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579523#M45448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;check the online help, specifically&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z0000000n000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z0000000n000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;case-sensitive&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you can import arcpy and do a help(arcpy) or dir(arcpy) to get further information or import its submodules and get further info there.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 20:26:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579523#M45448</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2010-12-14T20:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579524#M45449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That is helpful, thanks for that link.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For others running into this same conversion process it would be great if esri had a white paper or guide to the conversion process. But we can start one here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. replace 'import arcgisscripting' with 'import arcpy'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. remove gp = arcgisscripting.create(9.3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. find and replace all 'gp.' with 'arcpy.'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. modify environment vars like 'gp.extent' to read 'arcpy.env.extent'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5. check your case sensitivity for method calls like next() on a SearchCursor (not Next())&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and more to follow.......&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Dec 2010 12:56:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579524#M45449</guid>
      <dc:creator>KevinGooss</dc:creator>
      <dc:date>2010-12-15T12:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579525#M45450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Two reasons why you should switch to arcpy:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. You can use a for loop to iterate cursors in arcpy which is better than while loops.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. arcpy.mapping lets you edit mxds programatically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Case sensitivity is irritating though. getValue() not getvalue() or GetValue()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Dec 2010 13:15:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579525#M45450</guid>
      <dc:creator>ChrisMathers</dc:creator>
      <dc:date>2010-12-15T13:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579526#M45451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;increased sensitivity to overwriting in-memory datasets&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;before you may have been able to get away with it but now you need to make sure you have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.overwriteOutput = True&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Dec 2010 19:12:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579526#M45451</guid>
      <dc:creator>KevinGooss</dc:creator>
      <dc:date>2010-12-17T19:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579527#M45452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The very latest issue i have been dealing with is converting a script that handled some shapefile exports using the fieldMap and fieldMappings objects in arcpy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Once again the issue was with case sensitivity. The aliasName, outputField, and name methods have to begin with lowercase as they are listed in the docs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No errors are thrown if you have the incorrect case making it tough to track down these kinds of bugs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My best advice is to go through the docs for each method you call and see if you have the case correctly spelled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the next() method is used on cursors so i would check that you have the exact spelling and case syntax when creating the cursor and using it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 19:17:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579527#M45452</guid>
      <dc:creator>KevinGooss</dc:creator>
      <dc:date>2011-02-08T19:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579528#M45453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In arcpy you dont need to use next() in your cursors. Using next() was to force the cursor to advance to the next row in the table when using a while loop. Now that you can use a for loop next is not needed as for has better built in iterator functions. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for row in arcpy.SearchCursor(featureclass):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;do some stuff and automatically go to the next row&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 12:20:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579528#M45453</guid>
      <dc:creator>ChrisMathers</dc:creator>
      <dc:date>2011-02-09T12:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579529#M45454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don't need next() ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes you do, in anything but a SearchCursor because you need access to a row object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How would you do cur.insert(row) and cur.update(row) ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your 9.3 script is working, why bother rewriting it? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The arcgisscripting module is still there and it works just fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe write new scripts using arcpy, and leave the rest alone.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Feb 2011 08:52:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579529#M45454</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2011-02-12T08:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579530#M45455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You do not need to do anything to make your scripts work in 10.0, all previous functionality with the geoprocessor object will continue to work unmodified.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Feb 2011 18:31:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579530#M45455</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2011-02-12T18:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579531#M45456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I don't think that is entirely true.&amp;nbsp; There have been lots of my models and scripts that seem to have trouble.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you post something from a previous version which doesn't work in 10?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 14:36:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579531#M45456</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2011-02-14T14:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579532#M45457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kevin, perhaps the transfer from 9.2 to 10 is causing more of a problem (aka the switch from enumerations to python lists etc).&amp;nbsp; The only thing that I can think of off hand is that 9.3 had an ARCGISHOME environment variable which no longer exists in 10.&amp;nbsp; i used it frequently to import toolboxes that may reside there along with the system toolboxes, however, unless an alias was established, the method in V10 is a little more circuitous...&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;...code before
&amp;nbsp; sub_folder = "ArcToolbox/Toolboxes/"
&amp;nbsp; install_dir = arcpy.GetInstallInfo()['InstallDir'].replace("\\","/")
&amp;nbsp; tbx_home = os.path.join(install_dir, sub_folder)
...code after&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;unless I have missed something obvious&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:55:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579532#M45457</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T00:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579533#M45458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So far, I have also needed to change the path to any toolboxes I've loaded. For example... &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.AddToolbox("C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Data Management Tools.tbx")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I doing something I don't need to? This was originally a script back at 9.1 or 9.2 that imported win32com.client. Do we no longer need to call out a specific toolbox?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Gavin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 19:14:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579533#M45458</guid>
      <dc:creator>GavinMcGhie</dc:creator>
      <dc:date>2011-05-23T19:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579534#M45459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To my knowledge, you never needed to add the "AddToolbox" line to a script as long as you included the toolbox name after the tool name [e.g. gp.Clip_analysis()].&amp;nbsp; Before Arc10, adding the toolbox to the tool name was optional, now it's required.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 19:23:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579534#M45459</guid>
      <dc:creator>RDHarles</dc:creator>
      <dc:date>2011-05-23T19:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579535#M45460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmm. Odd. I assume that must have come out of model builder at some point as that is how we originally started our scripting. I've always assumed it was needed. I'll test without thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;G&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 19:28:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579535#M45460</guid>
      <dc:creator>GavinMcGhie</dc:creator>
      <dc:date>2011-05-23T19:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579536#M45461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hmm. Odd. I assume that must have come out of model builder at some point as that is how we originally started our scripting. I've always assumed it was needed. I'll test without thanks.&lt;BR /&gt;G&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You're not alone.&amp;nbsp; I see it all the time in people's scripts, output from Model Builder and even in ESRI's documention (before 9.3/10.0).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 19:36:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579536#M45461</guid>
      <dc:creator>RDHarles</dc:creator>
      <dc:date>2011-05-23T19:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Converting scripts to arcpy for use in ags 10</title>
      <link>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579537#M45462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;So far, I have also needed to change the path to any toolboxes I've loaded. For example... &lt;BR /&gt;from:&lt;BR /&gt;gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")&lt;BR /&gt;to:&lt;BR /&gt;gp.AddToolbox("C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Data Management Tools.tbx")&lt;BR /&gt;&lt;BR /&gt;Am I doing something I don't need to? This was originally a script back at 9.1 or 9.2 that imported win32com.client. Do we no longer need to call out a specific toolbox?&lt;BR /&gt;Thanks, Gavin&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If youre still using GP:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ARCHOME = gp.ArcInstallInfo("Desktop")["InstallDir"] # replaces os.environ["ARCHOME"] at 9.3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.AddToolbox(os.path.join(ARCHOME,"ArcToolbox/Toolboxes/Data Management Tools.tbx")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The above code will work for 9.x or 10.x&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But, note that system toolboxes do NOT need to be added, a new gp automatically has them all available, even though an export from modelbuilder includes the AddToolbox call.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 00:37:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-scripts-to-arcpy-for-use-in-ags-10/m-p/579537#M45462</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2011-05-24T00:37:15Z</dc:date>
    </item>
  </channel>
</rss>

