Let’s say you have no yet upgraded to Visio 2010 and need to design a container. You would set up a group shape, put in a frame and a label. As behaviour, you’d allow it to accept droped shapes.
So far easy… you add and remove sub-shapes – heaven in Visio World.
Now you will want to extend your group with additional shapes, you widen your group and Uhh… the sub-shapes stretch and move around. No prob, you set their behaviour to „reposition only“. Well that is not enough – the shapes still move in the direction of your stretching. Hmmm… You will open their shapesheets and put numerical values in their PinX, PinY. Fine, they don’t move around anymore when you resize the group.
The very next Monday, you’re asked to update the group and change the position of the sub-shapes, and you notice that the absolute positions are lost. Visio overwrites them with some ParentShape!width*number. Hummm… dumb Visio.
So you go to the obvious – and each time Visio overwrites your Pins - that is every time the eventFXMod is fired - you do the same and overwrite them their same numerical values, without the reference to the parent shape.
eventFXMod=SETF(GetRef(PinX),GetVal(PinX))+SETF(GetRef(PinY),GetVal(PinY))
I found that trivial solution so amazing simple, that I wanted to share it. Enjoy!
PS: The standard behaviour would be that the coordinates refer to the left bottom corner. One will often prefer to extend the group to the bottom, thus refer to the left TOP corner… Just flip your group vertically.
PPS: There are some other features in the attached container. I’ll let you discover by yourselves.