Select to view content in your preferred language

Grid Reference in Layout View

1007
4
08-26-2011 07:18 AM
DanEvans
Frequent Contributor
Hi,

Is there a way to insert the grid reference/X Y co-ordinates of the centre of the data frame in layout view? I'm working in British National Grid projection...

Cheers
Dan
Tags (2)
0 Kudos
4 Replies
DavidWatkins
Esri Contributor
Hi Dan,

You could write a Python script that would return the extent of the data frame, do the math to find the center, and then update a text element in the page layout with the coordinates.

Start with the help topic on the DataFrame properties available through Python found here:
 
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/DataFrame/00s300000003000000/

Then you can find an example of updating a text element with Python here:

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/TextElement/00s30000000m000000/

If you are new to Python, a good place to start is with the following Blog Post:

http://blogs.esri.com/dev/blogs/arcgisdesktop/archive/2010/09/24/getting-started-with-python-map-aut...

Hope this helps,
David
0 Kudos
DanEvans
Frequent Contributor
Thanks David, I'll give it a try.

Dan
0 Kudos
DanEvans
Frequent Contributor
I forgot to mention I'm using 9.3 - is it still possible?
0 Kudos
DavidWatkins
Esri Contributor
Hi Dan,

The Python methods I was describing are only available at 10 or later. You would need to write something using ArcObjects at 9.3. 

David
0 Kudos