eiverson_AQ

code for checking whether data driven pages enabled

Discussion created by eiverson_AQ on Apr 1, 2011
Latest reply on Aug 3, 2011 by Adhimoolam
Is there a means of checking, in Python, whether data driven pages are enabled in a particular MXD?

All the code and help I can find seems to imply this verification must take place manually, and if I call

mxd.dataDrivenPages


for a map document object that doesn't have DDP, I get an error.

Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\arcobjects\mixins.py", line 447, in dataDrivenPages
    return convertArcObjectToPythonObject(self._arc_object.pageLayout.dataDrivenPages)
AttributeError: PageLayoutObject: Get attribute dataDrivenPages does not exist

Outcomes