Page 1 of 1

JAVA API get view array with header???

Posted: Mon Jul 10, 2017 3:53 pm
by Drg
Hi guy's tell me how to build a view with setSuppressZeroes(true) and get coordinates of the cell?
Or the resultant arrays along the coordinate axes?

Example:

Code: Select all

//Create connection
...
//get cube 
TM1Cube Cube =ts.getCube("CUBENAME");
...
//loop dims, create N elements subset
...
//create view
TM1View View=Cube.createView(titleSubsetArr, columnSubsetArr, rowSubsetArr);
...
View.setSuppressZeroes(true);
View.constructArray();	
	
TM1Val Contents = View.getViewArrayValueByRange(1, 1, View.getNumberOfArrayRows(), View.getNumberOfArrayColumns());
//get value from Suppress Zeroes array

TM1Val CELL= Contents.getArrayVal(0).getArrayVal(1) ;
how i can get coordinats of this cell??? :roll: :roll: :roll:

Re: JAVA API get view array with header???

Posted: Tue Jul 11, 2017 6:44 am
by Drg
No ideas?
Am I the only one who has faced such a challenge?

Re: JAVA API get view array with header???

Posted: Tue Jul 11, 2017 3:56 pm
by Wim Gielis
Personally I haven't used that API yet so it would be difficult to give assistance.

Re: JAVA API get view array with header???

Posted: Wed Jul 12, 2017 6:39 am
by Drg
Wim Gielis wrote:Personally I haven't used that API yet so it would be difficult to give assistance.
IBM even says that it is part of the SDK(rest api, java extension). So I suspect that sooner or later it will remain a part of Performance modeler. :evil:

Re: JAVA API get view array with header???

Posted: Fri Jul 14, 2017 10:49 am
by Drg
UP

Re: JAVA API get view array with header???

Posted: Fri Jul 14, 2017 12:23 pm
by tomok
This is a pretty obscure question and I'm not surprised no one has answered. I've never even looked at the Java API and quite frankly, don't know why I ever would unless I was trying to create some third-party tool to try and sell to the TM1 community. Bumping it up to the top each day is not going to accomplish anything.

Re: JAVA API get view array with header???

Posted: Sun Jul 16, 2017 6:13 am
by Drg
tomok wrote:This is a pretty obscure question and I'm not surprised no one has answered. I've never even looked at the Java API and quite frankly, don't know why I ever would unless I was trying to create some third-party tool to try and sell to the TM1 community. Bumping it up to the top each day is not going to accomplish anything.
I would not ask a question on this forum, but only on this forum there is a detailed description of the use of Java api.

Was it interesting to know how you would solve the tasks of dynamic access to cubes from an external application?