Enabling data driven pages in a script

Discussion created by aj.jwair on Jul 19, 2011
Latest reply on Aug 2, 2011 by Adhimoolam
Hello everybody,

I am trying to enable data driven pages using a python script. It is as simple as it sounds, I cannot figure out a way to do it. I do not want to manually use the data driven pages toolbar AT ALL. Lets say I'm making a tool, I do not have manual access to every map the tool will run on.

Assume I have everything, take a very simple example, I have a map (mxd) and it has one data frame and one layer. I created a (grid) using:
and added it to the map as a layer.

Is there a way to programatically check that (enable data driven pages) checkbox ! and set the fields in (setup data driven pages)

My 'Layer' in this case will be 'grid'..

I know it is possible because according to ESRI:
"Map series can be created without any scripting at all by using the Data Driven Pages toolbar from within ArcMap. The reverse is also true: map series can be completely scripted using arcpy.mapping without using the Data Driven Pages user interface in ArcMap"

Could you please help me with that

Thank you very much in advance,