Please enable JavaScript to view this site.

Vensim Help

C/C++int VEFCC vensim_check_status() ; 

int VEFCC VensimCCheckStatus(int context) ;

Javapublic static native int check_status();

public static native int CCheckStatus(int context);

VBPrivate Declare Function vensim_check_status Lib "vendll32.dll" () As Long
Pascalfunction vensim_check_status : Integer ; stdcall ; external 'vendll32.dll' ;

vensim_check_status is used to check the current status of the Vensim DLL.  The two main purposes are to check Vensim is still in gaming mode, and to be sure Vensim is in a consistent internal state.

Arguments

None

Returns

0 - to indicate that Vensim is idle and awaiting activity.  This is the normal value.

1 - to indicate that Vensim is in an active simulation.  This value will normally be returned after vensim_start_simulation has been called but before vensim_finish_simulation has been called.

2 - to indicate that Vensim is in a simulation, but not an active simulation.  This value most likely indicates a frozen or hung condition in Vensim.

3 - to indicate that Vensim is blocking action.  This value should indicates an error condition in Vensim and will prevent commands from functioning.

4 - to indicate that Vensim is not able to free working memory allocations.  This is an error condition.

5 - to indicate that Vensim is currently working with an active gaming session.

6 - to indicate that Vensim has not freed all of its working memory.  Normally a call to vensim_command will correct this.

16 - SyntheSim is active and SETVAL will not trigger simulations.  This value will be added to the above values (eg 17 is SyntheSim is active and simulating).  Note that values other than 16, 17 and 22 indicate a problem.

32 - SyntheSim is active and SETVAL will trigger simulations.  This value will be added to the above values (eg 33 is SyntheSim is active and simulating).  Note that values other than 32, 33 and 38 indicate a problem.

Notes

The only return values you should see are 0, 1, 5, 32 and 33.  Other values indicate that Vensim is in an error state - please let us know if this happens.

See Also

vensim_start_simulation, vensim_continue_simulation, vensim_finish_simulation