Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Panning a map to the location of a selected feature

$
0
0
Hi folks, bashing my head today grappling with this one.

I have a point feature class that based upon a query I'd like the map to pan to that location. Then I can set the scale and export it to pdf.

I'm trying using SelectlayerByAttribute_management. The FC is Addresses and the field is Name

Code:

fc = "Addresses"

myQuery = " 'Name' = 'Fred Blogs' "
SelectlayerByAttribute_management(fc, "NEW_SELECTION", myquery)

The query appears to execute but i don;t end up with a selected record when I open the attribute table.

Viewing all articles
Browse latest Browse all 2485

Trending Articles