Is there a way to switch the version a .mxd data source is pointing at without using arcpy.mapping.findAndReplaceWorkspacePaths
?
I have a script that automates map book production that works very nicely. The source .mxd used by this script points as SDE.Default. Occasionally editors want to see how their edits will look in the final product before they rec and post changes to SDE.Default. To do this I want to call the existing script but have it's .mxd point to the same version that the editor is currently working on. I can't use the editors .mxd because it will not have the correct layout elements and data driven pages.
The only way I can think of to do this is to pragmatically create a new .sde connection file pointing at the edit version and use arcpy.mapping.findAndReplaceWorkspacePaths
with this new file to change the source.
But it would be easier and cleaner to just switch version on the map layers. Is this possible? Or is there another approach that I'm missing.