The "Change Version" tool currently allows you to change a version for a single layer. Normally when we want to change a version we do so for ALL layers in the active maps versioned datasource. The "change version" method on the Version ribbon lets us do this interactively.
I was quite happy to find the "Change Version" tool but when I started to use it, found that it only worked for a single layer or the fabric. Unfortunately, having multiple layers with different versions can cause problems. Also looping through ALL the layers in the active map can also be problematic.
I would like this tool to function the same way the ChangeVersion method works on the Versioning ribbon.
@DeanAnderson2 Can you try using batch geoprocessing?
https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/batch-geoprocessing.htm
You can make any tool to support multiple inputs:
You are correct. But it means I have to select each layer to the new version (selecting each one at time). If I mess up and miss one then I end up with to versions in the same session (always confusing).
I have tested a work around where I programmatically go through ALL layers in the active map and convert them. However, I am not sure how this impacts other maps and layouts in the project. It would just be so much easier if the tool operated the same way the interactive "change version" did.
@DeanAnderson2 it is somewhat easier than you described to select all using the Add Many picker on the batch tool, but I understand you might want the standard geoprocessing tool to match the interactive Change Version interface.
The Change Version context menu and button in the Versioning tab on the ribbon are changing the version for all layers that share the same workspace. This is specific to the items in the map document being connected to the same workspace based on the database connection or feature service they were added from and the version they are currently referencing.
NOTE: It looks like the Change Version tool was enhanced in 2.8 (Data Management gp history) to add the Include participating classes of controller dataset parameter.
You mentioned: can you expand a bit more on this ?
Unfortunately, having multiple layers with different versions can cause problems. Also looping through ALL the layers in the active map can also be problematic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.