Select to view content in your preferred language

Can't get the PanToExtent Tool to work

329
0
02-13-2023 03:32 PM
Labels (3)
rescobar
Occasional Contributor

I am having trouble automating a pan in my figure creation script. My script updates a layer's data source and then (WA_1) pans to its extent. The points will always be in a tight area in California, but it seems to pan back to the bay area. 

Here is my code, I have tried using the geometric extent and the symbolized extent, both yield the same results.

fig1_main_df_frm =fig1.listElements("mapframe_element","Main_DF Map Frame")[0]
xtent = fig1_main_df_frm.getLayerExtent(WA_1, False, True)
fig1_main_df_frm.panToExtent(xtent)

 

0 Kudos
0 Replies