I selected data by using select layer by attribute, then I need to only select these selection and zoom in to the selection. my code is this, it can zoom in base on the scale I set, but I see other adjacent polygon that has other Code_No, why?
Layer = arcpy.mapping.ListLayers(mxd, "lyr", df)
arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", "Code_NO = '%s'"%mycodeNo)
df.extent = lyrLayer1.getSelectedExtent()
df.scale *= 2
No comments:
Post a Comment