Clear

The Clear method clears values from cells in a view.

To call TM1CubeCellSpreadViewArray, and execute a clear function, the arguments must be set as described in the following table.

Argument

Description

hPool

hPool is a pool handle obtained with TM1ValPoolCreate.

hServer

hServer is a handle to an IBM® Cognos® TM1® server object. This handle is returned by the function TM1SystemServerConnect.

hView

hView is a handle to a view. A handle to a new view is returned by the function TM1ViewCreate. Handles to existing views are stored in the cube list property TM1CubeViews.

aCellRange

This argument is a TM1V containing an array of row and column pairs. There is either one pair of integers, or two pairs of integers.

If the array contains one pair of integers, the intersection of the row and column pair is the starting cell for the spread. For example, suppose the array was constucted as follows:

aCellRange
= {Row, Column}Row = 
TM1ValIndex(hPool, 1);
Column = 
TM1ValIndex(hpool,
1);

This indicates that the starting point for the spread is the top left-hand corner of the view. This location can be either a consolidated cell or a leaf cell.

If aCellRange defines a single consolidated cell, the entire consolidation will be cleared when the function executes successfully.

 

If the array contains two pairs of integers, the two pairs define a range of values.

For example, the aCellRange array for a proportional spread could be constructed as follows:

aCellRange = {Row1, Column1, Row2, Column2};

Row
= TM1ValIndex(hPool,
1);Column = TM1ValIndex(hpool, 3);
Row = TM1ValIndex(hPool, 3);
Column = TM1ValIndex(hpool, 4);

aCellRef

Set this value to TM1ArrayNull(). This argument is not used for a clear spread function.

sControl

The spread code for clear spread is C. Refer to Spreading control codes for complete information. Directional information is not required when aCellRange defines a range of cells. It is optional if aCellRange defines a single cell.

To call TM1CubeCellSpread, and execute a clear spread function, the arguments must be set as described in the following table.

Argument

Description

hPool

hPool is a pool handle obtained with TM1ValPoolCreate.

hServer

hServer is a handle to an IBM Cognos TM1 server object. This handle is returned by the function TM1SystemServerConnect.

vArrayofCells

vArrayofCells is a TM1V containing an array cell references. This array of cell references takes the form:

VArrayOfCells
= {Array1, Array2, Array3..., Arrayn};
Array1 = {CubeHandle1, ElementHandle,
ElementHandle..., ElementHandle};
Array2 = {CubeHandle2, ElementHandle, 
ElementHandle..., ElementHandle};

The cube handles can refer to different cubes. This allows you to spread data to multiple cubes with a single spreading command.

The starting location for the spread is the intersection of the element handles within the specified cube. Element handles are extracted from the TM1 dimension list property TM1DimensionElements.

If a cell referenced by vArrayofCells is consolidated, the entire consolidation is cleared.

vCellReference

Set this value to TM1ArrayNull(). This argument is not used for clear spread.

sSpreadData

The spread code for clear spread is C. Refer to Spreading control codes for complete information.