Question regarding versions and changing data sources

Discussion created by chad.stidham on Jul 16, 2013
Latest reply on Jul 16, 2013 by chad.stidham
I'm writing a script to change data sources for multiple layers in an mxd from one state-plane zone to another.  The database is an sde connection which I am using as my workspace.  The structure of the database is a feature dataset for each state plane zone with the same feature classes and the only difference is the feature class names have the state plane zone in them.  I am using the arcpy method replaceDataSource to change the sources which works great.  The only issue I'm having is that all of the feature classes are switched to the default version after the change.  I tried using the ChangeVersion_managment method to switch the version for each feature class in a loop and it is painfully slow.  It's actually faster to just change them all then change the version for the connection in the sources tab of the table of contents.  Is there some sort of environment variable or property I'm missing that would prevent the need for this?  It's not a terrible ordeal if not but I would prefer to eliminate as many steps as possible and make it efficient.  Any help is appreciated!