Solved! Go to Solution.
arcpy.AddMessage("Milepost Helper Point Count = {0}".format(featurecount3+featurecount7+featurecount5+featurecount2))
arcpy.AddMessage("Milepost Helper Point Count = {0}".format(featurecount3+featurecount7+featurecount5+featurecount2))
This works just as you said, thank you so much for the quick reply. Regards.
import arcpy # Local variables: events = "ProductionGIS.GISADM.NCS_SUB_CODE_EVT Events" layer_list = ["ProductionGIS.GISADM.NCS_CLEARANCE", "ProductionGIS.GISADM.NCS_MILEPOST", "ProductionGIS.GISADM.NCS_EQUATIONS", "ProductionGIS.GISADM.NCS_SIGN", "ProductionGIS.GISADM.NCS_SIGNAL", "ProductionGIS.GISADM.NCS_INTERLOCKING", "ProductionGIS.GISADM.NCS_SWITCH", "ProductionGIS.GISADM.NCS_XING" ] result_list = [] nodes_list = ["Equations","Switch"] milepost_additions = ["Milepost","Signal"] node_count = 0 milepost_count = 0 for layer in layer_list: arcpy.SelectLayerByLocation_management(layer, "INTERSECT", events, "", "NEW_SELECTION") result = arcpy.GetCount_management(layer) result_list.append([layer.split("_")[-1],int(result.getOutput(0))]) for name,count in result_list: name = name.capitalize() arcpy.AddMessage("{0} Point Count = {1}".format(name,count)) if name in nodes_list: node_count += count if name in milepost_additions: milepost_count += count arcpy.AddMessage("Nodes Point Count = {0}".format(node_count)) arcpy.AddMessage("Milepost Helper Point Count = {0}".format(node_count+milepost_count))