Page 1 of 1

TM1 API get attribute values

Posted: Thu Oct 28, 2010 4:02 pm
by aking
I'm trying to interface with TM1 through the API. I have a dimension from which I am trying to read the values in the attributes for elements. I can get a handle to the dimension and the elements fine, but if I do something like this:

Code: Select all

hPriorityAttr = TM1ObjectListHandleByNameGet(hPool, hDimension, TM1ObjectAttributes(), TM1ValString(hPool, "Priority", 8))
Debug.print TM1ValType(hUser, hPriorityAttry)
Debug prints out an error. The error is:
ObjectListIsEmpty (Or something along those lines)

My guess is I shouldn't be using the TM1ObjectAttributes(), but one of the other property list...doodads. Can Anyone point me in the right direction?

Re: TM1 API get attribute values

Posted: Thu Oct 28, 2010 5:16 pm
by Mike Cowie
Hi:

Your current code is trying to get the attributes of a dimension, not the attributes of elements of the dimension. Try instead passing in a handle to one element from your dimension and you should get the handle to the attribute you're looking for.

Regards,
Mike

Re: TM1 API get attribute values

Posted: Fri Oct 29, 2010 5:39 pm
by aking
Thanks, that did the trick.