C/C++ | int VEFCC vensim_get_state(char *runname, float *attime, void *buf, int maxbuflen) ; |
int VEFCC VensimCGetState(int context, char *runname, float *attime, void *buf, int maxbuflen) ;
The vensim_get_state function allows you to retrieve the state of a simulation from the named run. This state can then be used to resume the simulation. This, combined with vensim_set_state provides the same results as resuming from a run but is faster to execute. This is especially true in the multicontext DLL.
If vensim_get_state is called with a 0 or negative buffer size (maxbuflen), it will return the space needed for the buffer, without actually writing the state to *buf (which may be NULL).
Arguments
runname | The run from which to obtain the state |
attime | The time from which to resume |
buf | A buffer into which the state will be placed. |
maxbuflen | The maximum amount of space (in bytes) that can be used in buf. |
Returns
•0 if the state is empty
•A negative error message (see vendllerr.h)
•Otherwise, upon success, the size of the state buffer.
See Also