Ask A Cartographer

Label Expression to not show label of current data frame in layout view

July 18 2011 | 4 comments
Categories: Data Driven Pages

I'm using a polygon layer to define the data frames. The adjacent pages' frames overlap into each frame. I'd like to show the page numbers for the adjacent frames. I'm currently doing this by simply turning on the labels for my frames layer. However, this also shows the label for the current frame and I don't need/want that because I have a page number at the bottom. Is there some advanced script that I can put in the Label Expression that will in effect query out the current frame or frame label so it will not show? Is there another way to do what I want?

Mapping Center Answer:

If you do not have ArcGIS 10 yet, you will not be able to use Data Driven Pages to do this so easily; here is the link to a help topic for Using dynamic text with Data Driven Pages. I'm also going to assume you have ArcGIS 10 as a basis for the rest of this answer.

That said, you're not exactly following the path that this functionality was designed for, and your map design needs a little help.  For instance, in the example you provided, I cannot easily determine the intended extent of the information in the current extent. So, first, I would suggest having one layer that uses a different symbol to depict the current extent. You can use the Data Driven pages functionality for page Definition Queries to do this.

Here is roughly what I was able to do based on this:

  1. Set up my Data Driven Pages using my map sheets layer
  2. Added the Map Sheets layer two more times to my map. The first to symbolize the outlines of the other page extents, and the second to symbolize the current page extent.  For the other page extents, I symbolized their outlines with a much lighter symbol than I used for the current page extent's outline symbol--ensuring these extra lines (from the other page extents) did not make the map harder to read.
  3. For the layer with the other extents, I set the Page Definition Query to the "Don't Match Option" and for the current extent layer, I used "Match".
  4. Then just label the layer with the other extents, and you won't have a label for the current extent's polygon.

Got it to work with just two map sheet layers posted by Mark Boucher on Jul 25 2011 7:38AM
In my project, I did not want to see the polygon for the current extent because it was the data frame extent. I only wanted to see the extent of the adjacent sheets.
(1) I use the sheet layer for setting up the Data Driven Pages.
(2) I added it once more and made the polygon line type and label what I wanted and set the Page Definition Query to "Don't Match".
(4) I actually turned off the sheet layer I used for data driven pages. I didn't need to see it or label it since I only wanted to see and label the adjacent sheets.

I'm not sure why in the instructions above it says "Added the Map Sheets layer two more times to my map". Maybe the word "more" was not intended.
Glad it worked posted by Charlie Frye on Jul 25 2011 8:41AM
I was ultimately looking to give broader perspective to any others with a similar challenge. I'm glad the simpler approach worked for you.
DDP Labeling suggestion posted by Peter Goodman on Jul 26 2011 12:21PM
Because what you are referring to is something I do every day with a host of Atlas Maps, I too had a similar problem but used the exact solution you came up with, but with one additional step:
In the Feature attribute of the Grid_IndexFeature in the TOC, I add an additional column in the Attribute Table and label it “Detail”. I then set it up as either a short integer or text field if I have to add text. From there, I can use both the Page Definition query, AND the SQL Field Expression in the labeling Tab to control the look, feel, font and even define other attributes of the text for each window outline.
One thing to keep in mind though. Because I use the Actual Grid_IndexFeature, you must make a copy of it and set your parameters from that copy. Otherwise the DDP connection prohibits the use of Page Definition Query.
Good advice posted by Aileen Buckley on Aug 2 2011 1:33PM
Thanks for the advice about the additional field approach, Peter!

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |