<?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: Can arc9.3 read arcpy scripts/toolboxes made on arc 10 in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426689#M4620</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will try replacing the arcpy calls.&amp;nbsp; Below is the code I am trying to run.&amp;nbsp; It is a series of "select by attributes" to narrow down to a single polygon, then a zoom to selected.&amp;nbsp; Pretty sure this is all available in 9.3, right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Import arcpy module&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# set workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.workspace = "C:/temp/"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument('CURRENT')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Script arguments&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;section = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;township = arcpy.GetParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;range_ = arcpy.GetParameterAsText(2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;range_dir = arcpy.GetParameterAsText(3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Local variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PLSS = "PLSS"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#### Use the SelectLayerByAttribute tool to select a Section&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SelectLayerByAttribute_management(PLSS, "NEW_SELECTION", "\"SECTION\" = "+section)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"TOWNSHIP\" = "+township)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"RANGE\" = "+range_)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"RANGE_dir\" = "+range_dir)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# zoom to the selection&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;df.zoomToSelectedFeatures()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;df.scale = df.scale * 2.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Clear the selection and refresh the active view&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SelectLayerByAttribute_management(PLSS, "CLEAR_SELECTION")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshActiveView()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Sep 2010 15:11:08 GMT</pubDate>
    <dc:creator>MikeHouts</dc:creator>
    <dc:date>2010-09-30T15:11:08Z</dc:date>
    <item>
      <title>Can arc9.3 read arcpy scripts/toolboxes made on arc 10</title>
      <link>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426687#M4618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Some of our workstations have been upgraded to 10, while others are still at 9.3.&amp;nbsp; Im trying to share a model/toolbox I made using 10 with a user still on 9.3 (python 2.5).&amp;nbsp; I&amp;nbsp; saved the toolbox as a 9.3 toolbox, but it contained some python script that references arcpy.&amp;nbsp; Will a simple update to python 2.6 enable it to recognize the arcpy call, or is everything created in 10 stuck there.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 19:18:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426687#M4618</guid>
      <dc:creator>MikeHouts</dc:creator>
      <dc:date>2010-09-22T19:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can arc9.3 read arcpy scripts/toolboxes made on arc 10</title>
      <link>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426688#M4619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ArcGIS 9.3 applications can NOT read the ArcPy site package newly available at 10 so import arcpy is not understood by 9.3.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can replace import arcpy with import arcgisscripting - both 9.3 and 10 can use that.&amp;nbsp; This will work if you are only using capabilities available at 9.3.&amp;nbsp; There are some new functions that won't be backwards compatible (e.g,&amp;nbsp; all of arcpy.mapping).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Sep 2010 14:38:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426688#M4619</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2010-09-23T14:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can arc9.3 read arcpy scripts/toolboxes made on arc 10</title>
      <link>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426689#M4620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will try replacing the arcpy calls.&amp;nbsp; Below is the code I am trying to run.&amp;nbsp; It is a series of "select by attributes" to narrow down to a single polygon, then a zoom to selected.&amp;nbsp; Pretty sure this is all available in 9.3, right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Import arcpy module&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# set workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.workspace = "C:/temp/"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument('CURRENT')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Script arguments&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;section = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;township = arcpy.GetParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;range_ = arcpy.GetParameterAsText(2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;range_dir = arcpy.GetParameterAsText(3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Local variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PLSS = "PLSS"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#### Use the SelectLayerByAttribute tool to select a Section&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SelectLayerByAttribute_management(PLSS, "NEW_SELECTION", "\"SECTION\" = "+section)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"TOWNSHIP\" = "+township)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"RANGE\" = "+range_)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"RANGE_dir\" = "+range_dir)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# zoom to the selection&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;df.zoomToSelectedFeatures()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;df.scale = df.scale * 2.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Clear the selection and refresh the active view&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SelectLayerByAttribute_management(PLSS, "CLEAR_SELECTION")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshActiveView()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Sep 2010 15:11:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426689#M4620</guid>
      <dc:creator>MikeHouts</dc:creator>
      <dc:date>2010-09-30T15:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can arc9.3 read arcpy scripts/toolboxes made on arc 10</title>
      <link>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426690#M4621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Update...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I got the select portion of the code to work fine by replacing the arcpy calls, but cant find a way to set the data frame to the selected feature.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did find some long convoluted method that looped through all the polygons and created an envelope, but this cant be the only way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions on doing a zoom to selected in 9.3 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Sep 2010 16:40:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426690#M4621</guid>
      <dc:creator>MikeHouts</dc:creator>
      <dc:date>2010-09-30T16:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can arc9.3 read arcpy scripts/toolboxes made on arc 10</title>
      <link>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426691#M4622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unfortuneately you won't be able to.&amp;nbsp; Arcpy.mapping is a new module at 10 and is not backward compatible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Oct 2010 13:39:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426691#M4622</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2010-10-01T13:39:26Z</dc:date>
    </item>
    <item>
      <title>zoom to selected in 9.3</title>
      <link>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426692#M4623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jeff, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to you previous post about the non backward compatibility of arcpy, I adjusted the model to get the "select by attribute" portion working, but am still stuck on the zoom to selected part.&amp;nbsp; Below is the new script, is there a way to set the data frame to the selected in 9.3?&amp;nbsp; The problem part of my script is the bottom 5 lines that are currently commented out.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import sys, string, os, 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;## Load required toolboxes ##&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# gp.addtoolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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 = "C:/temp/"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# mxd = MapDocument('CURRENT')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# df = ListDataFrames(mxd,"Layers")[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Script arguments&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;section = gp.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;township = gp.GetParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;range_ = gp.GetParameterAsText(2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;range_dir = gp.GetParameterAsText(3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Local variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PLSS = "PLSS"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#### Use the SelectLayerByAttribute tool to select a Section&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.SelectLayerByAttribute_management(PLSS, "NEW_SELECTION", "\"SECTION\" = "+section)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"TOWNSHIP\" = "+township)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# arcpy.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"TOWNSHIP_D\" = S")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"RANGE\" = "+range_)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"RANGE_dir\" = "+range_dir)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;##################&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;### zoom to the selection ###&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# df.zoomToSelectedFeatures()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# df.scale = df.scale * 2.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;### Clear the selection and refresh the active view&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# gp.SelectLayerByAttribute_management(PLSS, "CLEAR_SELECTION")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.RefreshActiveView()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Oct 2010 13:28:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426692#M4623</guid>
      <dc:creator>MikeHouts</dc:creator>
      <dc:date>2010-10-04T13:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can arc9.3 read arcpy scripts/toolboxes made on arc 10</title>
      <link>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426693#M4624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I understand that arcpy cannot be run with 9.3 applications, but can it run with Python 2.5 instead of 2.6?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 23:04:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426693#M4624</guid>
      <dc:creator>jamesmanzione</dc:creator>
      <dc:date>2011-01-13T23:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can arc9.3 read arcpy scripts/toolboxes made on arc 10</title>
      <link>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426694#M4625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;2.6.x is required.&amp;nbsp; See the following help topic:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/install_guides/arcgis_desktop_install_guide/index.html#//008700000007000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/install_guides/arcgis_desktop_install_guide/index.html#//008700000007000000.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jan 2011 14:15:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/can-arc9-3-read-arcpy-scripts-toolboxes-made-on/m-p/426694#M4625</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2011-01-14T14:15:53Z</dc:date>
    </item>
  </channel>
</rss>

