import arcpy, os from arcpy import env env.workspace = r"C:\temp\python\test.gdb" env.overwriteOutput = 1 county = raw_input("Please type either WARREN, WASHINGTON, OR ESSEX: ") key = raw_input("Please type the Parcel ID: ") # User selects COUNTY and then Print Key value, Select by Attribute tool runs arcpy.MakeFeatureLayer_management("Parcels", "Parcels_feat") arcpy.SelectLayerByAttribute_management("Parcels_feat", "NEW_SELECTION", "COUNTY = " + "'" + county + "'") arcpy.SelectLayerByAttribute_management("Parcels_feat", "NEW_SELECTION", "PARCELS_ID = " + key) arcpy.CopyFeatures_management("Parcels_feat", "Parcels_Selection") print "Executed succesfully"
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.