Jeff,
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. Below is the new script, is there a way to set the data frame to the selected in 9.3? The problem part of my script is the bottom 5 lines that are currently commented out.
Thanks.
import sys, string, os, arcgisscripting
## create the geoprocessor object ##
gp = arcgisscripting.create()
## Load required toolboxes ##
# gp.addtoolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx
# set workspace
# arcpy.env.workspace = "C:/temp/"
# mxd = MapDocument('CURRENT')
# df = ListDataFrames(mxd,"Layers")[0]
# Script arguments
section = gp.GetParameterAsText(0)
township = gp.GetParameterAsText(1)
range_ = gp.GetParameterAsText(2)
range_dir = gp.GetParameterAsText(3)
# Local variables:
PLSS = "PLSS"
#### Use the SelectLayerByAttribute tool to select a Section
gp.SelectLayerByAttribute_management(PLSS, "NEW_SELECTION", "\"SECTION\" = "+section)
gp.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"TOWNSHIP\" = "+township)
# arcpy.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"TOWNSHIP_D\" = S")
gp.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"RANGE\" = "+range_)
gp.SelectLayerByAttribute_management(PLSS, "SUBSET_SELECTION", "\"RANGE_dir\" = "+range_dir)
##################
### zoom to the selection ###
# df.zoomToSelectedFeatures()
# df.scale = df.scale * 2.0
### Clear the selection and refresh the active view
# gp.SelectLayerByAttribute_management(PLSS, "CLEAR_SELECTION")
gp.RefreshActiveView()