Hello,
I would appreciate help from the board. This is a shortened version of a larger script but this is where the problem seems to lie. I get the error below even though these layers exist in the mxd. Ive also run these from arccatalog. In that case, they usually work, but a couple of times they did not. That leads me to believe its an SDE issue. Im running 10, SV2.
ERROR 000732: Input Feature Layer: Dataset FLUM does not exist or is not supported
ERROR 000732: Selecting Features: Dataset ZoningCases does not exist or is not supported
Failed to execute (SelectLayerByLocation).
#--------------------------------------------------------------------------------------------
# Import system modules
import arcpy
from arcpy import env
import os
arcpy.env.overwriteOutput = True
#set workspace
arcpy.env.workspace = r"G:\NEIGHBOR PLAN\ArcView\Projects\Templates\\"
#set mxd
mxd = arcpy.mapping.MapDocument(r"G:\NEIGHBOR PLAN\ArcView\Projects\Templates\test.mxd")
#set dataframe
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
#select features from FLUM within 2000 feet of ZoningCases
arcpy.SelectLayerByLocation_management("FLUM", "WITHIN_A_DISTANCE", "ZoningCases", "2000 feet", "NEW_SELECTION")
del mxd
#-----------------------------------------------
Thanks!!
Paul Frank
City of Austin