Alright here I go again this forum has been good to me. I add a layer and replace its data with a shapefile I created using the following bit of python:
layer = arcpy.mapping.Layer("C:/GIS/images.lyr") arcpy.mapping.AddLayer(df, layer) lyr = arcpy.mapping.ListLayers(mxd,"images",df) lyr.replaceDataSource(projectlocation+projectname+"/Aerial/"+"/"+projectdate,"SHAPEFILE_WORKSPACE","images") lyr.name = "Images"
I cannot figure out how to set the extents of the mxd to the new source data I can just get it to set it to the original extents of the shp the .lyr from saved from. Any help is greatly appreciated.