da Search Cursor Does Not Respect Page Definition Query

2819
6
09-29-2015 08:14 AM
RustyRex
Occasional Contributor

I have a DDP set up that also includes Page Definition Query on layers in the MXD.  I have python script that references this map includes an arcpy.da.searchcursor that loops through the same feature class that has the Page Definition Query.  When it loops through it sees all the features rather than just the features that are limited by that page's Page Definition Query.  Is this suppose to be that way?

Since I am already in python, a work around would be to just forget about the Page Definition Query and call the DDP page name.  Then i could use that for an old fashion definition query before my arcpy.da.searchcursor.  Anyone know the code to call the current DDP page name?

0 Kudos
6 Replies
FreddieGibson
Occasional Contributor III

Have you tried using the pageRow returned from the data driven pages class?

DataDrivenPages (arcpy)

http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/datadrivenpages-class.htm

NeilAyres
MVP Alum

Sorry Freddie, that link is broken when I access it...

0 Kudos
JenniferMcCall4
Occasional Contributor III

If you copy the link into your browser, instead of just clicking on the link, it works

0 Kudos
NeilAyres
MVP Alum

Thanks

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Just because the broken link is hard to copy and paste...

DataDrivenPages—Help | ArcGIS for Desktop

This may work better for the next person.....EDIT....and yet it doesn't.    Timothy Hales​  Jive issue again?

TimothyHales
Esri Notable Contributor

Rebecca Strauch, GISP​  - Yes, it appears there is an issue with Jive. I will get a case created with Jive to determine the issue. Thanks for letting me know!