Hi all,
I am having trouble getting the arcp.GetCount_management to print the GetCount arcpy.AddMessage in the geoprocessing dialog window;
# Get the spatial reference
spatialRef = arcpy.Describe(template).spatialReference.name
#Loop through shapfiles in folder and reproject
for fc in fcList:
fcspatialRef = arcpy.Describe(fc).spatialReference.name
if fcspatialRef != spatialRef:
arcpy.AddMessage(fc)
arcpy.Project_management(fc, outFolder + "\\" + fc, template)
projCount = int(arcpy.GetCount_management(fc).getOutput(0))
else:
arcpy.CopyFeatures_management(fc, outFolder + "\\" + fc)
<SPAN class="com"># Get the count from GetCount's Result object</SPAN>
arcpy.AddMessage("{0} datasets have been reprojected to: {1} and saved in {2}".format(projCount, spatialRef, OutFolder))