Microsoft Visio 2007 Professional and 2010 Professional and Premium includes the Network / Rack Diagram template, which opens the Rack-mounted equipment stencil. This stencil includes the Patch Panel master which can be stretched from 2U to 25U high. However, I have often required a 1U patch Panel, so I decided to look into the Microsoft shape to see if it could be modified to allow it to be reduced to 1U without looking ridiculous.
I changed the formula to =BOUND(2,0,FALSE,1,25), and was then able to change the UHeight to 1U, but the 24 ports remained visible:
I actually wanted the number of ports to be halved to 12, so I set about exploring the sub-shapes in the master. I found that Sheet.18 contains the port shapes, and that its height is fixed at 2 Us. All of its sub-shapes have a height formula referencing this height, so I decided to modify the PinY formula to =Sheet.5!Height*0.5*(IF(Sheet.5!Prop.UCount=1,2,1)) so that it would move the lower bank of ports up into the correct position if the Prop.UCount equals 1.
Then it was just necessary to go through each of the sub-shapes of Sheet.18 to modify the GeometryX.NoShow formula to =Sheet.5!Prop.UCount=1 for each Geometry section which is in the upper half of the shape.
At this point, I could see that I had to put this formula into 12 geometry sections of 4 shapes, which is 48 copy and pastes! Therefore, I decided to write some VBA code to do this instead. This has the advantage that you can run the code on existing documents that already have the Patch panel master in it. In fact, the Patch panel master must be in the local document stencil for this code to work.
And there you have it … the Patch panel can now be reduced to 1 U and it looks OK!
If you cannot be bothered to run the code, you can download the updated Patch panel and the code from here : click here