Lists of objects
The property TM1ObjectParent is used to identify an object's parent.
The parent object has a list property that lists all of its children of a given type. For example, server objects have the properties TM1ServerDimensions and TM1ServerCubes. These properties list all the dimensions and cubes in the server.
Views and subsets can be either public or private. IBM® Cognos® TM1® distinguishes between them both by the property TM1ObjectRegistration, and by keeping the objects on different lists. For example, to get a list of public subsets, you need the subset handle, and the TM1ObjectList... functions. To get the list of private subsets, you need the TM1ObjectPrivateList... functions.
The following functions allow the user to navigate through all the objects in an object list:
- TM1ObjectListCountGet returns the number of items on a list.
- TM1ObjectListHandleByIndexGet accepts an index argument, and returns the handle of the object in that position in the list. Indexes are one-based. If the index is too large or too small for the number of objects in the list, an error is returned.
- TM1ObjectListHandleByNameGet accepts the name of an object on the list as an argument, and returns a handle to it. If no object of the given name can be found in the list, an error is returned.
- _Ref411736492TM1ObjectListPrivateHandleByIndexGet accepts an index argument, and returns the handle of an object in that position in the private list. Indexes are one-based. If the index is too large or too small for the number of objects in the list, an error is returned.
- TM1ObjectListPrivateHandleByNameGet accepts the name of a object on the private list as an argument, and returns a handle to it. If no object of the given name can be found in the list, an error is returned.
The public and private lists contain only registered objects. It is your responsibility to keep track of unregistered objects. See Creating and registering objects for more information on registered and unregistered objects.