if FeatureToPoint == "in_memory\\A_FeatureToPoint": arcpy.Select_analysis(locationstands, outfeatureclass, "\"identify\" = 'A'"); arcpy.AddMessage("worksA")
# Import:import arcpyimport sysimport osfrom arcpy import env# Variables:FeatureToPoint = arcpy.GetParameterAsText(0)locationstands = arcpy.GetParameterAsText(1)outfeatureclass = arcpy.GetParameterAsText(2)if FeatureToPoint == "in_memory\\A_FeatureToPoint": arcpy.Select_analysis(locationstands, outfeatureclass, "\"identify\" = 'A'"); arcpy.AddMessage("worksA")elif FeatureToPoint == "in_memory\\B_FeatureToPoint": arcpy.Select_analysis(locationstands, outfeatureclass, "\"identify\" = 'B'"); arcpy.AddMessage("worksB")elif FeatureToPoint == "in_memory\\C_FeatureToPoint": arcpy.Select_analysis(locationstands, outfeatureclass, "\"identify\" = 'C'"); arcpy.AddMessage("worksC")elif FeatureToPoint == "in_memory\\D_FeatureToPoint": arcpy.Select_analysis(locationstands, outfeatureclass, "\"identify\" = 'D'"); arcpy.AddMessage("worksD")elif FeatureToPoint == "in_memory\\E_FeatureToPoint": arcpy.Select_analysis(locationstands, outfeatureclass, "\"identify\" = 'E'"); arcpy.AddMessage("worksE")elif FeatureToPoint == "in_memory\\F_FeatureToPoint": arcpy.Select_analysis(locationstands, outfeatureclass, "\"identify\" = 'F'"); arcpy.AddMessage("worksF")elif FeatureToPoint == "in_memory\\G_FeatureToPoint": arcpy.Select_analysis(locationstands, outfeatureclass, "\"identify\" = 'G'"); arcpy.AddMessage("worksG")elif FeatureToPoint == "in_memory\\H_FeatureToPoint": arcpy.Select_analysis(locationstands, outfeatureclass, "\"identify\" = 'H'"); arcpy.AddMessage("worksH")elif FeatureToPoint == "in_memory\\I_FeatureToPoint": arcpy.Select_analysis(locationstands, outfeatureclass, "\"identify\" = 'I'"); arcpy.AddMessage("worksI")elif FeatureToPoint == "in_memory\\J_FeatureToPoint": arcpy.Select_analysis(locationstands, outfeatureclass, "\"identify\" = 'J'"); arcpy.AddMessage("worksJ")elif FeatureToPoint == "in_memory\\AA_FeatureToPoint": arcpy.Select_analysis(locationstands, outfeatureclass, "\"identify\" = 'AA'"); arcpy.AddMessage("worksAA")else: arcpy.AddMessage("doesntwork")
arcpy.Select_analysis(locationstands, outfeatureclass, "identify = '%s'" % feature_label)
FeatureToPoint = arcpy.GetParameterAsText(0) feature_label = arcpy.GetParameterAsText(1) locationstands = arcpy.GetParameterAsText(2) outfeatureclass = arcpy.GetParameterAsText(3) if FeatureToPoint == "U:\\Intern\\Ulrich\\fairbanks_biomass\\test.gdb\\%s_FeatureToPoint" % feature_label: arcpy.Select_analysis(locationstands, outfeatureclass, "identify = '%s'" % feature_label) arcpy.AddMessage("works%s" % feature_label) else: arcpy.AddError("doesntwork")
feature_label = arcpy.GetParameterAsText(0) # String locationstands = arcpy.GetParameterAsText(1) outfeatureclass = arcpy.GetParameterAsText(2) if FeatureToPoint == "in_memory\\%s_FeatureToPoint" % feature_label: arcpy.Select_analysis(locationstands, outfeatureclass, "\"identify\" = '%s'" % feature_label) arcpy.AddMessage("works%s" % feature_label) else: arcpy.AddError("No match for feature label %s" % feature_label)
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.