? TM1Cell.Value {get; set} problem

Post Reply
User avatar
yyi
Community Contributor
Posts: 122
Joined: Thu Aug 28, 2008 4:42 am
Location: Sydney, Australia

? TM1Cell.Value {get; set} problem

Post by yyi »

hi Everyone,

trying to use the value propery of TM1Cell class and running into a problem with passing the string[] parameter for
dimension elements. ie: [element1, element2 ...element(n)]

it seem to find the element names okay as long as there's no hierarchy and the dimension element are all top nodes.
when the element names are further down the tree, the code just throws a fit and and claims
"Element [CC101] not found in dimension [Cost Centre]" because it's under a consolidated element,
or at least i think that's the reason. :cry:

does anyone have any working sample or syntax reference?
i'm a newbie to .net api

Code: Select all

            
TM1Cube cube = server.Cubes["Stats"];
string[] nDim = new string[] { "Actual", "201400", "CC101", "General", "2010/2011", "Feb", "Amount" };
TM1Cell cell = cube.Cells[nDim];
Yeon
User avatar
yyi
Community Contributor
Posts: 122
Joined: Thu Aug 28, 2008 4:42 am
Location: Sydney, Australia

Re: ? TM1Cell.Value {get; set} problem

Post by yyi »

the code actually works on a different set of elements on the same cube !!
so either the api is buggy or the cube/dimension has some internal addressing issues maybe..

can someone offer any theories on this?


thanks
Yeon
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: ? TM1Cell.Value {get; set} problem

Post by tomok »

yyi wrote:so either the api is buggy or
or perhaps your list of elements are not unique, meaning they exist in another dimension too and TM1 is getting confused???? Try prefacing each element with the dimension name as well like "Cost Centre:CC101".
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
User avatar
yyi
Community Contributor
Posts: 122
Joined: Thu Aug 28, 2008 4:42 am
Location: Sydney, Australia

Re: ? TM1Cell.Value {get; set} problem

Post by yyi »

thanks for the suggestion, i tried it out but still didn't work.
after trying a multitude of debug, test, rewrites and even rebuilding using plain win form apps;
finally got it to work :P the code started to get really long and can't recall all the different things i
tried while half asleep, but i think it was to do with re-setting the environment for the project like
target framework, iis settings, and reloading reference to applix.tm1.api and removing any
libraries that potentially conflicts. i removed system.windows.forms just in case and went with
java in code-behind aspx instead.
haven't worked out exactly what caused the problem, but i'll have to leave for later as i don't
have much time to finish the web pages.
Yeon
Post Reply