/// <summary> /// Iterates over all dimensions in this server /// and stores them in the dimensions List /// </summary> public void SetDimensions() { for (int i = 1; i <= GetNumberOfDimensions(); i++) { int hDim = TM1API.TM1ObjectListHandleByIndexGet(this.pool.handle, this.handle, TM1API.TM1ServerDimensions(), TM1API.TM1ValIndex(this.pool.handle, i)); if (TM1API.IsError(user.handle, hDim)) { throw new Exception(); } Dimension dim = new Dimension(this.pool, this, hDim); dimensions.Add(dim); } }
/// <summary> /// Iterates over all cubes on this server /// and stores them in the cubes List /// </summary> public void SetCubes() { for (int i = 1; i <= GetNumberOfCubes(); i++) { int hCube = TM1API.TM1ObjectListHandleByIndexGet(this.pool.handle, this.handle, TM1API.TM1ServerCubes(), TM1API.TM1ValIndex(this.pool.handle, i)); if (TM1API.IsError(user.handle, hCube)) { throw new Exception(); } Cube cube = new Cube(this.pool, this, hCube); cubes.Add(cube); } }
/// <summary> /// Iterates over all dimensions in this cube /// and stores them in the dimensions List /// </summary> public void setDimensions() { int nOfDims = getNumberOfDimensions(); for (int i = 1; i <= nOfDims; i++) { int hDim = TM1API.TM1ObjectListHandleByIndexGet(this.pool.handle, this.handle, TM1API.TM1CubeDimensions(), TM1API.TM1ValIndex(this.pool.handle, i)); //if (TM1API.IsError(this.server.user.handle, hDim)) // throw new Exception(); //int nameProp = TM1API.TM1ObjectPropertyGet(pool.handle, hDim, TM1API.TM1ObjectName()); // WORKS!!!!!! //string dimName = TM1API.intPtrToString(server.user.handle, nameProp); dimensions.Add(new Dimension(pool, server, hDim)); } }
public void setElements() { int nOfElements = getNumberOfElements(); for (int i = 1; i <= nOfElements; i++) { int hElement = TM1API.TM1ObjectListHandleByIndexGet(this.pool.handle, this.handle, TM1API.TM1DimensionElements(), TM1API.TM1ValIndex(this.pool.handle, i)); if (TM1API.IsError(this.server.user.handle, hElement)) { throw new NoSuchElementException(); } int nameProp = TM1API.TM1ObjectPropertyGet(pool.handle, hElement, TM1API.TM1ObjectName()); // WORKS!!!!!! string elementName = TM1API.intPtrToString(server.user.handle, nameProp); Element element = new Element(this.pool, this.server, hElement); elements.Add(element); } }