C/C++ | int VEFCC vensim_get_val(char *name,float *val) ; |
int VEFCC VensimCGetVal(int context,const char *name,float *val) ;
Java | public static native int get_val( String varName, float val[] ); |
public static native int CGetVal(int context, String varName, float val[] );
VB | Private Declare Function vensim_get_val Lib "vendll32.dll" (ByVal varname$, varval As Single) As Integer |
Pascal | function vensim_get_val(varname:PChar; varvals: SinglePtr): Integer ; far ; external 'vendll32.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.
Arguments
name the fully subscripted name of the variable.
val a pointer to a single 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_data