Excel, TM1 and soccer

Public default cube views

Nov. 2, 2014

Introduction

As a follow-up to my previous article on creating views on cubes, I wanted to share similar coding to create Default public views.
I will not be the first one to write these kind of loops, nor will I be the last. Therefore, feel free to use the codes below. They are self-explanatory to any serious TM1 user/developer.

As was explained earlier, the Default subset and Default view change names when you change the language of the client interface like TM1 Perspectives.
So make sure to update the constant value at the top of the code to match your language.

The code will create a Default view only for the application cubes and it will skip control cubes (any cube starting with }).
Please note that the Default subset in every dimension of the cube, is used. In case it does not exist, you will be presented with an error. So make sure every dimension that is used in a cube
has a Default public subset. This is best practice anyway. If you cannot be sure this is the case, add some lines of code to check whether the subsets exist. If you do not know how to do so,
check out other pages on my website and you will definitely find the answers you need.