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:
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.
Code:
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)