Back in 2013 I wrote a program call RackPSGen. You hand it a "config file" (read: ruby script that defines global variables) that defines where different types of rack mounted equipment is located in a rack, and it spits out a PostScript file that shows a graphical representation of the rack (example in the repo). It had its problems, and it was VERY kludgy (especially when trying to view the output in a web browser), but it worked.
I have recently wrote a replacement program that is an XSLT that takes in an XML and outputs an SVG. It is much cleaner then the PostScript version and can actually be rendered in a web browser.
This new program can be found here on GitHub.