> Script Details
Synchronise (link) data frame extents in ArcMap
report inappropriate content
Dec 16 2009
Status of work
ArcScripts is intended for the free exchange of scripts and tools related to ESRI software products. Please alert the moderator if this script is a demo, trial-version, or an advertisement for a retail product.
(Please see http://arcscripts.esri.com/details.asp?dbid=13306 for a newer .Net version of this code.)
This code allows the user to synchronise or link the extents of two data frames, such that panning or zooming in one data frame will update the linked data frame accordingly.
This could be useful to show different datasets side-by-side for the same area - eg showing the soil types in one map with the vegetation types in another map. When panning in the soil map, the vegetation map would also pan to maintain the same extent, and vice versa.
To use, add 2 or more data frames to a map, then press the Synchronise Data Frames button to open the form.
The Active Data Frame is the data frame that is currently selected - its name will be shown in bold in the Table of Contents. Set the value for the Target data frame using the dropdown menu.
Pan or zoom in the active data frame, then use the Update button on the form to update the extent of the target data frame. Checking the Auto Update option will cause updates to the target data frame to occur automatically.
Note that this script applies the rectangular extent of the active data frame to the target data frame, which may result in slight discrepancies in the viewable area if the data frames are different shapes, or if the coordinate systems are not the same.
History - uploaded 30th August 2005
Updated 21st March 2006
Included installation instructions - 17th December 2009
Please report any problems or comments via the ArcScripts page.