BIHints has a very interesting article about using Perl and the graphviz graphing tool to create visual diagrams to document TM1 systems.
http://www.bihints.com/node/49
Blog of IBM Cognos TM1, Cognos BI, Cognos Express, CDM and other related stuff.