A recent newsgroup question asked for example code to demonstrate how shape data can be copied from one shape to another via a connector between the two. This is something that others might want to do also, and not just by connecting shapes, but also by selection since you might change your mind about which shape to use, but you have already entered a lot of information on the original shape. A good example of this might be when diagramming a network and needing to change between one type of server and another. So, in this blog, I will demonstrate how shape data can be transferred by connection or by selection, and how to limit the transfer to rows that match by name or by label.
Note that Shape Data is the new name for Custom Properties in Visio 2007.
Firstly, I should explain why it may be necessary to match by name or by label: In the following screenshot, you can see the Shape Data window, Define Shape Data dialog, and the ShapeSheet for a Server shape. I have ticked “Run in developer mode” in Tools / Options / Advanced, otherwise I would not be able to see the Name, Sort key, Ask on drop or Hidden in the dialog.