The attached document describes how you can add custom scripts on OLAP objects in TX.
There are four samples in the document that can be used for inspiration:
- Change the setting of the UnknownMember property on a dimension
- Insert description before the ID node of a cube
- Insert description after the ID node of a cube
- Add drillthrough actions to a cube
See this closely related post on how to modify a cube or dimension using XPATH.