I need a arcpy script to process data from a selection, it's made manually in arcmap.
the selection is part of a mesh, to print data from a specified field.
Can i put a selection made ??????manually as input parameter for a script?
until now, I have a script that processes the selection stored in a layer that is displayed in the TOC
#import arcpy module # import arcpy # Load the MXD default document # mxd = arcpy.mapping.MapDocument("CURRENT") # Define the TOC default Data Frame # df = arcpy.mapping.ListDataFrames(mxd, "Capas") #access to the target (mesh selection), stored in a layer, #By selecting the corresponding layer located on the TOC # fc = arcpy.mapping.ListLayers(mxd,"",df) #define of the field to consult. # field = "idMalla" print "campo idMalla: " # query for reading a specified field. # cursor = arcpy.SearchCursor(fc) for row in cursor: print(row.getValue(field)) # delete memory del mxd, df