Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Create Temporary Dataset to Use With Data Driven Pages

$
0
0
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:

Code:

        arcpy.Select_analysis(propertyFeatureClass, "in_memory\PropertySelected", propertyField + " = " + propertyID)
So can I change the data source to an in memory data source? like this:

Code:

        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?

Viewing all articles
Browse latest Browse all 2485

Trending Articles