TM1 SDK

Attached to this page is the TM1 Open Source Toolkit developed by James Wakefield

v 1.0.1 adds:
.vba code for running TI processes/chores
.vba for running MDX reports

v 1.0 includes:
.Treeview control on form showing TM1 Servers with cubes and public views. An Imagelist control is used to populate the treeview with images.
.Button on Treeview form allowing user to select view and be written to Excel
.Button on Treeview form allowing user to select view and be shown equivalent MDX statement
.Button on Treeview form allowing user to select view and be shown equivalent XML statement
.form in vba that people can easily use to collect text commentary into TM1
.KillTM1 module of Robert Gardiner's that kills DBRW'S

Definitely a great piece of work to see how the API can be used.
It also saves you from reinventing the wheel.

I will try to track and make available all (future) versions of that toolkit on this page.