My understanding what you mean about changing the layout is to replace two
shapes or to change the order, if so how would you like to start with replace
two shapes.
Sub test()
Dim mySelection As Selection
Set mySelection = ActiveWindow.Selection
If mySelection.Count = 2 Then
ReplaceShapes mySelection(1), mySelection(2)
End If
End Sub
Sub ReplaceShapes(shp1 As Visio.Shape, shp2 As Visio.Shape)
Dim Ddumy As Double
Ddumy = shp1.Cells("PinX")
shp1.Cells("PinX") = shp2.Cells("PinX")
shp2.Cells("PinX") = Ddumy
Ddumy = shp1.Cells("PinY")
shp1.Cells("PinY") = shp2.Cells("PinY")
shp2.Cells("PinY") = Ddumy
End Sub