Projecting features to dataset

Discussion created by mzcoyle on May 25, 2011
Latest reply on May 26, 2011 by mzcoyle
Hi all, I am having some problems projecting data from a dataset into another dataset. The output always seems to go to the root output geodatabase location, instead of the defined dataset. I've tried making the output dataset the workspace and still it does not go there. Is this working as intended and I am just missing something? Here is the code below. I eventually hope to be able to loop through multiple datasets, but I have it hardcoded to just get it to do one for now.

I am able to do other exports and I checked to make sure they have the same spatial reference. Any ideas?

sde = r"D:\sde_transit\sde1.gdb\\"
output = r"D:\sde_transit\sdeNAD83.gdb\\"
arcpy.env.workspace = sde
outCS = r"C:\Program Files (x86)\ArcGIS\Desktop10.0\Coordinate Systems\Projected Coordinate Systems\UTM\NAD 1983\NAD 1983 UTM Zone 12N.prj"
transformation = r"NAD_1927_To_NAD_1983_NTv2_Canada"
inCS = r"C:\Program Files (x86)\ArcGIS\Desktop10.0\Coordinate Systems\Projected Coordinate Systems\UTM\NAD 1927\NAD 1927 UTM Zone 12N.prj"

dsList = arcpy.ListDatasets("", "Feature")
fcList = arcpy.ListFeatureClasses("","",dsList[3])
for feature in fcList:
 desc = arcpy.Describe(feature)
 featout = output+dsList[3]+"\\"
 print featout
 arcpy.Project_management(feature, featout, outCS, transformation, inCS)