where did my polygon go?

Discussion created by Cyndy on May 14, 2013
Latest reply on May 15, 2013 by Wayne_Whitley
I'm again at work on some legacy code, and I'm stumpled on why one bit is not working as I'd expect.  Here is the code snippet:

def poly2xylist(layer):
    arcpy.CopyFeatures_management(layer, r"C:\Temp\workdammit.shp")
    layercopy = arcpy.CreateScratchName("xxxx", "", "shapefile")
    arcpy.MakeFeatureLayer_management(layer, "layercopy")
    howmany = (arcpy.GetCount_management("layercopy").getOutput(0))
    arcpy.AddMessage("howmany is " + howmany)

When this function is called, howmany comes out as 0. Yet, if I look at my test output (workdammit) in ArcMap, I do have a polygon feature in there, in the attribute table.  So where does it 'go'?   I'm stumped, here.