import arcpy #Variables Parcels = arcpy.GetParameterAsText(0) arcpy.AddMessage(Parcels) mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] lyr = arcpy.mapping.ListLayers(mxd, "Parcels", df)[0] arcpy.AddMessage(lyr.name) #Logic try: whereClause = "RENUM = "+Parcels+"" arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", whereClause) df.extent = lyr.getSelectedExtent() df.scale = df.scale*1.1 except: print arcpy.GetMessages()
Solved! Go to Solution.
James,
After much frustration, I was finally able to convert some of my tools to buttons. Back, to the initial part of my search. Can you provide an example string that would ask the user to provide their name? I would like to have the value entered directly into a field in the attribute table. Or at least point in the correct direction with which function to use.
Thanks again.
inputName = arcpy.GetParameter(0)
James, you are the man. You deserve a nice cold beer. I greatly appreciate all of your guidance.