Except for the #local Variables, the body of this script works fine. When working with one feature class, setting a workspace seems easy, but when setting the workspace for multiple feature classes it becomes more difficult. If anyone can help-a world of thanks, Larry import arcpyimport sets#local Variables:Asbuilt_Log = "C:/Projects/Asbuilt_Log.gdb"Rancho = "C:/Projects/North/Rancho.gdb"Clearlake = "C:/Projects/South/Clearlake.gdb#Body of scriptset_one = set, int(r[0] for r in arcpy.da.SearchCursor("Asbuilt_Log", "GWO"))set_two = set, int(r[0] for r in arcpy.da.SearchCursor("Rancho", "GWO"))set_three = set, int(r[0] for r in arcpy.da.SearchCursor("Clearlake", "GWO")) print "Items unique to Asbuilt_Log: {}".format(", ".join(sorted(set_one-set_two-set_three)))
import arcpy import sets #local Variables: Asbuilt_Log = "C:/Projects/Asbuilt_Log.gdb/NameOfFeatureClassHere" # edit this Rancho = "C:/Projects/North/Rancho.gdb/NameOfFeatureClassHere" # edit this Clearlake = "C:/Projects/South/Clearlake.gdb/NameOfFeatureClassHere" # edit this fldName = "YourFieldToCompare" # edit this #Body of script set_one = set(int(r[0]) for r in arcpy.da.SearchCursor(Asbuilt_Log, fldName)) set_two = set(int(r[0]) for r in arcpy.da.SearchCursor(Rancho, fldName)) set_three = set(int(r[0]) for r in arcpy.da.SearchCursor(Clearlake, fldName)) print "Items unique to Asbuilt_Log: {}".format(", ".join(sorted(set_one-set_two-set_three)))
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.