Version: Visio Pro 2021
I will often want to alter shape data sets that apply to a host of shapes. Adding a new property to the shape data set totally works fine, but the order is often annoying so I want to change the shape data set element's "sort key." FYI this must be done in developer mode to have access to the sort key. This is a pretty straight forward thing and I am blown away that this doesn't work correctly. Short story is that if a shape data set is used and then applied to a shape or shapes, and then you decide to change the sort key of the elements of that shape data set, the shape data is lost. No only that, but its as though some pointer gets totally borked because the shape data graphics no longer work properly: The shape data shown in the shape data window will all reset to the default value, but the data graphics don't lose their shape data. However, the shape data graphics will no longer update with changes to the shape data once alteration to the shape data set sort keys has occurred. And if you look at the ShapeSheet, you will see all the values are default, but still somehow the shape data graphics are maintaining whatever data was entered.
Reproduction of this is really easy:
1. Make some shapes on a blank sheet.
2. Using the "shape data sets" pane, create a shape data set with a couple of elements using "Add", or "Define" if there is an existing shape data set: I think there is a sample shape data set that suffices, with two elements "Description" and "ID" but anything will work so long as there is more than one element. Leave the values blank. Click okay when done to exit the shape data set definition window.
3. Select all shapes on the sheet and using the shape data sets pane, select the shape data set check box for your shape data set and click "apply" to apply the shape data set to all the shapes.
4. Make a unique entry for the first property of the shape data for each shape using the shape data window.
5. Select all shapes and then use "Edit Data Graphic" to show this by creating a New Item that displays the unique property as text. Click okay and say yes to apply to the shapes when prompted. You should now have a bunch of shapes with their first property, all with some unique text, displayed as a data graphic. So far all works as normal.
6. Edit the shape data set again by selecting the shape data set and clicking "Define..." and alter the sort key for each element. Again, this is done to the master shape data set object, not to an individual shape's shape data. The goal here is to sort all the shapes shape data by altering the master shape data set object. Click okay.
What you should see now is that the shape data graphic still retains whatever unique identifier you gave. So at first glance everything seems okay. However, if you click on the shape to see its shape data, the data is gone. Try altering the the data in the shape data window and changes to it will NOT reflect in the shape data graphics. Somehow changing the sort key of the shape data set has caused a disconnect between the shape data and the shape data graphic. The shape data graphic somehow retains all the data but is no longer linked to the shape data as shown in the shape data pane.
Any thoughts? Help?
One lame work around I found is that you can change the sort key's of each individual shape's shape data without issue, but that's an annoying work around. You should be able to alter the master sort keys via the shape data set just like you can alter the master to add more elements and see these new elements applied to al the shapes.