C/C++ | int VEFCC vensim_get_dpval(char *name,double*val) ; |
int VEFCC VensimCGetDPVal(int context,const char *name,double *val) ;
Java | public static native int get_dpval( String varName, double val[] ); |
public static native int CGetDPVval(int context, String varName, double val[] );
VB | Private Declare Function vensim_get_dpval Lib "vendll32.dll" (ByVal varname$, varval As Double) As Long |
Pascal | function vensim_get_dpval(varname:PChar; varval: DoublePtr): Integer ; stdcall ; external 'vendll132.dll' ; |
Use this function to get the value of a variable during a simulation (with vensim_start_simulation...), as a game is progressing, or during simulation setup. This function is only useful if you are using the double precision Vensim DLL.
Arguments
name the fully subscripted name of the variable.
varval a pointer to a double precision floating point number that will be filled in with the value.
Returns
1 to indicate the number has been successfully retrieved. 0 to indicate the variable was not found.
Notes
During a simulation or a game, vensim_get_val will return a valid number for all variables in a model. Before a simulation or game has started, vensim_get_val will return valid numbers for constants and missing or :NA: (-1.2980742146337069E33) for other model variables. You can use the test command (e.g. vensim_command("TEST>c=5")) to force 1 stage intermediate computation just as in a Venapp.
See Also
vensim_get_val, vensim_get_data