Destroying '}CellSecurity_' and '}ElementSecurity_' Cubes via TI

Post Reply
mnaithan
Posts: 28
Joined: Fri Mar 06, 2015 10:07 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2007

Destroying '}CellSecurity_' and '}ElementSecurity_' Cubes via TI

Post by mnaithan »

Hello, I am trying to destroy all current '}CellSecurity_' and '}ElementSecurity_' Cubes via TI ( with dimension '}Cubes' as data souce and SUBSET = 'ALL') , but I found a strange behavior that I have to run TI 3,4 time to delete every }CellSecurity_' and '}ElementSecurity_' Cube , its deleting some cubes in every run instead of at once

MetaData Tab:

If( Subst(vCube,1,14) @= '}CellSecurity_' % Subst(vCube,1,17) @= '}ElementSecurity_');
CubeDestroy(vCube);
Endif;

Does anyone knows reason for this, or the better approach would be removing these .cub files from data directory rather then destroying via TI, thanks
declanr
MVP
Posts: 1815
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Destroying '}CellSecurity_' and '}ElementSecurity_' Cubes via TI

Post by declanr »

Try instead having no datasource and looping the dimension backwards:

Code: Select all

iCount=DimSiz(cDim);
While(iCount > 0);
      sCubeName= DimNM(cDim, iCount);
      If....
      
      Endif...
      iCount = iCount - 1;
End;
Declan Rodger
mnaithan
Posts: 28
Joined: Fri Mar 06, 2015 10:07 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2007

Re: Destroying '}CellSecurity_' and '}ElementSecurity_' Cubes via TI

Post by mnaithan »

It worked ..!., thanks Declan
Post Reply