Sorry, I did not understand that you asked how does it work.
Here are explanation for "flat" variant. I did following:
1. Draw big rectangle and convert it into group, open ShapeSheet and change DisplayMode to 1 (Group Properties section)
2. Draw two texts ("OPEN", "CLOSED"), locate them on rectangle and Add to group;
3. Draw 1 small recangle, press F2 and enter the text "1", then use TextBlock tool to shift this text down. After that duplicate this rectangle 7 times, place them inside big box, change text ("2", "3", "4"...) add to group;
Here comes the most diffuclt thing.
4. Open ShapeSheet and insert Controls section, then insert 8 rows - you will get 8 yelow controls in bottom left corner of the shape.
5. Locate each control on its place and enter necessary formulas- check them in my shape. General idea is to limit movement of the control (X-coordinate is constant, Y-coordinate - only two positions - up and down);
Now we have "casing" of DIP-switch and movable controls for each switch.
6. Draw dark small rectangle, place it inside DIP and add to group.
7. Open ShapeSheet of this DARK SMALL rectangle (not a big one!) and adjust its position (PinX, PinY) - enter Sheet.xxx!Controls.x1 for PinX and Sheet.xxx!Controls.y1 for PinY. You've got switch number 1 !
8. Same for other switches (2-8).
9. Control number 9 is used for text reposition, I hope you could understand necessary modifications in TextTransform section of main group.
All necessary additional information about cells in ShapeSheet and used functions you can find in help, just press F1!
Visio 2003 SP3