Not entirely sure what you mean. Right now there is a workflow that might work for you to add data to an MXD:
- Save out a layer file with the desired symbology, with any data source
- Use arcpy.mapping.Layer(filename) object to get a handle to it in Python
- Change the layer.dataSource property to your new data source (make sure it's the same feature type as the saved layer; point/poly/etc)
- Use arcpy.mapping.AddLayer to add the edited layer to the desired dataframe
There is also the arcpy.mapping.UpdateDataSources function which has bulk data source updating capability on map documents.
There is also the arcpy.mapping.UpdateDataSources function which has bulk data source updating capability on map documents.Does this function work? I tried using this, it returns successfully creating a new MXD, but nothing changes in the document.