Need help to export shape files based on limits of dataframes... I've got this far but think I'm going in the wrong direction:
import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
mxd.dataDrivenPages.currentPageID = pageNum
arcpy.FeatureClassToFeatureClass_conversion("ParcelPoly","C:\Test\name","name"... need help here
del mxd
FeatureClassToFeatureClass has no extent parameter. Are you perhaps trying to clip to the extent
Or Clipping the Data Frame.... specifically Clipping to currrent data driven page extent... These two don't actually clip featureclasses either
Basically just looking to export data based on the limits of the dataframe without doing it manually. Maybe I can find another way. Thanks!
You can stil do that by scripting, but is there just one layer in your dataframe or multiple layers? Have you thought about the output names of the featureclasses that you will create? And perhaps more importantly, why do you want to do this? Is it really necessary?
You could read out the extents of the pages and create a featureclass and loop through the features of that featureclass and clip the featureclass(es) and create the outputs.
Yea...names aren't important. It's basically one shape file (covering a huge limits) that I'm trying to divide into smaller files to make the size of the shape files more manageable with 3rd party software.
Your dataframe extents may have overlap depending on how they were defined in relation to the size of your dataframe. If the idea is to manage it in smaller chunks in 3rd party software, you could consider to Create Fishnet—Help | ArcGIS Desktop , and Intersect—Help | ArcGIS Desktop and then use Split By Attributes—Help | ArcGIS Desktop or http://www.arcgis.com/home/item.html?id=15ca63aebb4647a4b07bc94f3d051da5 depending on the version you have.
Thanks