I am working with ArcGIS 10.2 and using python to use the function for zoom to selected feature. I need to have this zoom to selected feature work for any project and I also need drop down menus for all of the SQL's (Quarter section, township, range, and meridian) that I currently have.
Zoom to Selected Feature in SearchMap Dataframe
import arcpy mxd = arcpy.mapping.MapDocument('CURRENT') df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] df.zoomToSelectedFeatures() df.scale = df.scale * 1.1
Clear selections on the Southern Reference Grid layer DataFrame
clearLyrs = ["Southern Reference Grid"] for clearLyr in clearLyrs: lyr = arcpy.mapping.ListLayers(mxd, clearLyr, df)[0] arcpy.SelectLayerByAttribute_management(lyr, "CLEAR_SELECTION")
arcpy.RefreshActiveView()
أكثر...
Zoom to Selected Feature in SearchMap Dataframe
import arcpy mxd = arcpy.mapping.MapDocument('CURRENT') df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] df.zoomToSelectedFeatures() df.scale = df.scale * 1.1
Clear selections on the Southern Reference Grid layer DataFrame
clearLyrs = ["Southern Reference Grid"] for clearLyr in clearLyrs: lyr = arcpy.mapping.ListLayers(mxd, clearLyr, df)[0] arcpy.SelectLayerByAttribute_management(lyr, "CLEAR_SELECTION")
arcpy.RefreshActiveView()
أكثر...