Hi, I'm trying to use a SearchCursor to loop through specific records in a layer in an ArcMap project. I would like loop through specific records based on a text field in the layer but I'm having trouble figuring out the syntax. Can anyone help please? Code below.
# Set the variables mxd = arcpy.mapping.MapDocument(r"\\working\BioFire.mxd") df = arcpy.mapping.ListDataFrames(mxd,"Layers") lyr = arcpy.mapping.ListLayers(mxd,"Fire",df) # Loop through specified records in layer ### I CAN'T FIGURE OUT THE CODE FOR THIS NEXT BIT cur = arcpy.SearchCursor(lyr, '"FIRECODE" in ("ARC", "CEA", "DAB", "MGD")') ### IF I USE THE LINE BELOW INSTEAD IT WORKS FINE BUT LOOPS THROUGH ALL RECORDS WHICH I DON'T WANT #cur = arcpy.SearchCursor(lyr) . . . .