shaun_weston-eagle-co-nz-esridist

Create Temporary Dataset to Use With Data Driven Pages

Discussion created by shaun_weston-eagle-co-nz-esridist on May 23, 2013
Latest reply on May 24, 2013 by shaun_weston-eagle-co-nz-esridist
I'm wanting to create a temporary dataset, add it into an MXD (that uses data driven pages) then export to PDF.

So, I've got an MXD setup with data driven pages and the script will change the data source of the layer and zoom to it. I want to keep the feature in memory like this:

        arcpy.Select_analysis(propertyFeatureClass, "in_memory\PropertySelected", propertyField + " = " + propertyID)

So can I change the data source to an in memory data source? like this:

        selectionLayer.replaceDataSource(r"in_memory","FILEGDB_WORKSPACE","PropertySelected");


The other way I could solve my problem is by creating the in memory feature class as a layer and adding it into the map document, but I need data driven pages and you don't seem to be able to enable data driven pages via python.

Any ideas?

Outcomes