Hello,
Something strange I noticed (only) now.
When you use TI to create a view and you use ViewCreate and ViewSubsetAssign, the corresponding *.vue file will contain:
7,dimensionname
6,ALL
So the (implicit) subset is put as ALL, for every dimension even if you specify a valid subset in 1 or more cube dimensions.
The view looks good in Architect (the correct subsets are applied), and the Properties window in Architect also displays the correct subsets.
You have to go in the view and save it before TM1 updates the *.vue file.
Am I missing something, or would it be a bug of some sort ? TM1 10.2.2.6
Thanks !
ViewCreate and ViewSubsetAssign
-
- MVP
- Posts: 3240
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
ViewCreate and ViewSubsetAssign
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: ViewCreate and ViewSubsetAssign
I don't think it's a bug. The big thing to bear in mind is that TM1 does not always read from its files while it's running for obvious performance reasons. When Manny said "in memory", he meant "in memory". That's why you can't update a TI by, for example, the simple method of slipping a new .pro file into the data directory while the server is running, even though many of us have probably wished that it were so over the years.Wim Gielis wrote: Something strange I noticed (only) now.
When you use TI to create a view and you use ViewCreate and ViewSubsetAssign, the corresponding *.vue file will contain:
7,dimensionname
6,ALL
So the (implicit) subset is put as ALL, for every dimension even if you specify a valid subset in 1 or more cube dimensions.
The view looks good in Architect (the correct subsets are applied), and the Properties window in Architect also displays the correct subsets.
You have to go in the view and save it before TM1 updates the *.vue file.
Am I missing something, or would it be a bug of some sort ? TM1 10.2.2.6
When you create the view, TM1 creates the .vue file but I think this is just a "marker". It does not, as far as I am aware, re-read from the .vue file again until reboot time. (We're talking public views here, which of course TI views are; private views are read on user login, but that's not relevant here.) It doesn't need to because the definition of the view is stored in the server's memory following its creation. (Hence the reason that you see the correct view in Architect.) That being the case, there is nothing to be gained by spending the time writing the view definition back to disk every time the definition is altered by, for instance, a ViewSubsetAssign command. It just becomes another disk write that has to be done. (In fact it didn't even have to write the .vue file in the first place; not at that time anyway. There are probably data integrity reasons for it to do so; maybe as a reminder at shutdown that this definition is there, maybe to allow it to do a cross-check of in memory definitions against the .vue files and report inconsistencies, maybe as insurance against a server crash; I don't know. But the key point is that it need not do it.) Incidentally, a ViewDestroy will delete the file as well.
Which brings me to the key point; you won't only see the .vue file update if you open the view and save it, but also if you do a data save on the server. The purpose of that save is of course to tuck everything that is in memory away to disk. And this apparently includes not just data, but also view and other definitions that may have been created during the preceding session.
It's different when you use the GUI; there you define the entire view and when you hit [Save] only a single write operation is done. With TI you have the potential of having to do up to a write per dimension (if a subset is assigned for each one), plus one for each export flag or dimension set, etc. It probably matters less with modern hard disk systems (especially SSDs) but it may have once mattered a lot.
I'd therefore rate this one as "expected behaviour"; it's only the (seeming) inconsistency of creating the .vue file when ViewCreate is called that makes it appear to be anything else.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- MVP
- Posts: 3240
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: ViewCreate and ViewSubsetAssign
Hello Alan,
Many thanks. That makes sense
In fact, CubeSaveData() appears to be sufficient. I will add that "safety measure" in my TI process.
It's a generic TI process where I use PowerShell to find combinations of "7,dimension nameCRLF6,subset name" in *.vue files, with regular expressions.
But for that to be possible the *.vue files need to be updated.
Wim
Many thanks. That makes sense

In fact, CubeSaveData() appears to be sufficient. I will add that "safety measure" in my TI process.
It's a generic TI process where I use PowerShell to find combinations of "7,dimension nameCRLF6,subset name" in *.vue files, with regular expressions.
But for that to be possible the *.vue files need to be updated.
Wim
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- MVP
- Posts: 3240
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: ViewCreate and ViewSubsetAssign
Hmmm, as I don't know upfront in which cubes the dimension is used,
it will be better to do a loop over cubes and each time a CubeSaveData (or a SaveDataAll for all cubes).
it will be better to do a loop over cubes and each time a CubeSaveData (or a SaveDataAll for all cubes).
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly