Display polygons based on current data driven page.

1910
1
05-24-2012 08:02 AM
HunterSimmons
New Contributor
I have a relatively simple map book consisting of apartment complexes/condos/etc in our area.  I recently migrated to Data Driven Pages in ArcInfo 10.  I have a feature class containing polygons encapsulating each complex (Call this the ApartmentOutlines feature class).  Another feature class contains polygons making up the grid for the data driven pages (Call this the ApartmentGrid feature class).  The map book is working great.  However, some items display on pages where they're not needed.  For instance, page one of the map book is supposed to display Magpie apartments.  There just so happens to be another apartment complex adjacent to Magpie apartments.  So what is ultimately displayed on page one is magpie apartments hightlighted via a polygon on the map, but also another polygon partially displays (some is out of visible range) hightlighting the adjacent apartment complex as well.  I would like to be able to display/not dispaly a feature based on the number of the current page.  I can do this manually for each page, but I would like to be able to write code that would handle this process for me.

In the ApartmentGrid feature class there is a field entitled Appendix_Num that contains the sort number for my data driven pages.  In the ApartmentOutlines feature class there is a field entitled DisplayOn that contains the corresponding map book page to display a polygon feature.

Logically, this is what I want to happen. 

Each time you change to a new page or print the set...

What page am I currently on?

Loop through the features in ApartmentOutlines.

IF
    current page of map book (Example: 1)  =  DisplayOn

Then

    display feature

else

    do not display feature



Is this possible?  Is there a better way to accomplish my goal?  I am familiar with a few programming languages, but fairly new to the ArcGIS world, so any help would be greatly appreciated.
0 Kudos
1 Reply
HunterSimmons
New Contributor
OK, there is actually a very easy solution for this.  I've used Definition Queries before, but never checked out what the "Page Definition" button does.  Well, for anyone that stumbles onto this quesiton in future, the page definition button does exactly what the logical code above attempted.

I created a definition query on the ApartmentOutlines layer and then used the page definition button to display only those polygons where the DisplayOn field matched the page number (actually page name when you are setting up DDP).
0 Kudos