Utility Functions : List of Utility Functions : stm_unload_all

stm_unload_all
Function Type
void
Description
Unloads all charts from the current workarea and clears all database fields. It is one of the four utility functions (stm_load, stm_save, stm_unload, and stm_unload_all) that provide an interface between the workarea of the Rational Statemate user and external files.
This function is not equivalent to calling the stm_unload function for each chart in the database. The differences between these two functions are as follows:
stm_unload takes a fixed amount of time regardless of the number of charts in the database. It does not perform an unload of individual charts, but rather cleans all database data. Usually this function cleans the database much faster than by unloading individual charts one by one.
stm_unload_all clears the internal ID counter of charts in the database, whereas the stm_unload function does not. This counter starts from 0 when the workarea database is initially created and is incremented each time a chart is created or loaded into the database. It is not decremented when charts are unloaded (deleted). When this counter reaches the value of 1023, no more charts can be loaded or created in the database. There are two ways to reset this counter: calling the stm_unload_all function from a program, or interactively via the Delete charts from the Workarea option of Rational Statemate with the Delete all and Without confirmation flags set.
Note:
When using this function, you must work in the automatic transaction mode by specifying automatic_transaction as the third argument (trans_mode) of the stm_init_uad function. Your program should contain lines similar to the following:

 

int success, status;
...
success = stm_init_uad("MY_PROJECT",
"/local/my_work_area",
automatic_transaction, &status);
if (!success)
....

Syntax
stm_unload_all (message, &status)
Arguments
Input/Output
A buffer that holds the error message, if an error occurs. This buffer can hold 127 characters.
 
Status Codes