Add an option to the Change Version to change all layers not just a single or group of layers.

769
4
09-09-2022 04:30 PM
Status: Open
Labels (1)
DeanAnderson2
Occasional Contributor II

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. 

4 Comments
DrewFlater

@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:

DrewFlater_0-1663106988708.png

 

 

DeanAnderson2

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.  

 

 

DrewFlater

@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. 

DrewFlater_0-1663179857961.png

 

MelissaJarman

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. 

MelissaJarman_0-1663719972367.png

 

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.