Layer titles in group animation

1128
2
06-03-2012 12:50 PM
JimWooten
Occasional Contributor
Hello;

I've created a group animation in ArcMap 10 with the layers representing 7 different age groups by county.  The animation works fine but I can't find a way to add a title for each layer so that the title changes as the layer changes.  I've tried inserting text in both the data view and layout view but that didn't work.  Any suggestions?  Thanks.
0 Kudos
2 Replies
JeffBarrette
Esri Regular Contributor
Have you tried automating this with arcpy.mapping?

You could use a python script to change the text of a title element on you page layout.

For example,

mxd = arcpy.mapping.MapDocument("CURRENT")
title = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "title")[0]
lyr1 = arcpy.mapping.ListLayers(mxd, "Layer1")[0]
lyr1.visible = True
title.text = "Title for lyr 1"
lyr1.visible = False
lyr2 = arcpy.mapping.ListLayers(mxd, "Layer2")[0]
lyr2.visible = True
title.text = "Title for lyr 2"

etc.


Jeff
JimCousins
MVP Regular Contributor
A less elegant solution is to create annotation attached to each layer, so "Titles" appear when the specific layers are visible.