AnsweredAssumed Answered

how to connect to a feature class within a feature dataset using Python

Question asked by matt.walker@cartopac.com on May 2, 2012
Latest reply on May 18, 2012 by matt.walker@cartopac.com
I am trying to modify a feature class that is within a feature dataset using python, but I keep getting the error that the feature class does not exist.  I have read many posts that state you do not have to list in the workspace the feature dataset, but the only feature classes I can see when running a arcpy.ListFeatureClasses are the ones that are outside of the feature datasets.  Here is the script I am trying to run:

import arcpy
from arcpy import env
env.workspace = r"database connections\connection to KM-BASE.sde"
arcpy.AddField_management("Exposures_Platte", "STATE", "TEXT", "", "", "50", "", "NULLABLE", "NON_REQUIRED", "")

The error I get is this:

Runtime error <class 'arcgisscripting.ExecuteError'>: ERROR 000732: Input Table: Dataset Exposures_Platte does not exist or is not supported

What am I doing wrong here?

Outcomes