CubeClearData
CubeClearData clears all of the data in a cube. This function is much faster than doing an operation such as creating a view to cover the entire cube, and then doing a ViewZeroOut() to zero out the entire cube.
When you use CubeClearData to clear data from a cube, any cells in the cube that are fed with feeders are also cleared. You must resave the rule that establishes the feeders or use the CubeProcessFeeders function to restore the fed cells.
This function deletes only the cube data, it does not delete and re-create the cube itself. This has implications when sandboxes are used. If a cube is deleted and then re-created, any sandboxes a user may have will be discarded, since the cube against which those sandboxes were created was deleted (even though a cube may have been re-created with the same name). If, however, CubeClearData is used, the sandbox data will still be considered valid, since the cube against which the sandbox was created continues to exist.
CubeClearData is valid in processes only.
Syntax
CubeClearData( name-of-cube-as-string );
Argument
The name of the cube to clear, as a string.
Example
CubeClearData( 'expense' );