C/C++ | int VEFCC vensim_get_info(int infowanted,char *buf,int maxbuflen) ; |
int VEFCC VensimCGetInfo(int context,int infowanted,char *buf,int maxbuflen) ;
Java | public static native String[] get_info(int infowanted) ; |
public static native String[] CGetInfo(int context,int infowanted) ;
VB | Private Declare Function vensim_get_info Lib "vendll32.dll" (ByVal infowanted As Long, ByVal buf$, ByVal maxbuflen As Long) As Long |
Pascal | function vensim_get_info(infowanted:Integer;buf:PChar; maxbuflen:Integer): Integer ; stdcall ; external 'vendll132.dll' ; |
Use this function to get information about Vensim, what model is loaded and related things.
Arguments
infowanted Specifies the type of information desired.
• | 1 for the type of DLL (Minimal, Silent, Full or Redist) |
• | 2 for the version of Vensim |
• | 3 for the Vensim user name and company (two strings) |
• | 4 for the current active directory |
• | 5 for the current model name |
• | 6 for the name of the loaded toolset |
• | 7 for the names of the tools in the current toolset |
• | 8 for the name of the currently loaded custom graph set |
• | 9 for the names of the custom graphs in the currently loaded graph set |
• | 10 for the names of the currently loaded runs |
• | 11 for name of the run that will be used when a simulation is made (SIMULATE>RUNNAME) |
• | 12 for the list (comma separated) of cin files that will be used (SIMULATE>CHGFILE) |
• | 13 for the list (comma separated) of data files (SIMULATE>DATA) |
• | 14 for the run the simulation will be based on (SIMULATE>BASED) |
• | 15 for the name of the optimization control files (SIMULATE>OPTPARM) |
• | 16 for the name of the payoff definition file (SIMULATE>PAYOFF) |
• | 17 for the resume status (0 or 1) (SIMULATE>RESUME) |
• | 18 for the name of the savelist ( SIMULATE>SAVELIST) |
• | 19 for the name of the sensitivity savelist (SIMULATE>SENSSAVELIST) |
• | 20 for the name of the sensitivity control file (SIMULATE>SENSITIVITY) |
• | 21 for the name of the workbench variable including all subscripts |
• | 22 for a list of the views in the model (first is view 1, second view 2 and so on) |
• | 23 for the start, stop and special time (for time base Time returned as strings). |
• | 24 for any wildcard maps for Excel file names as shown in the XLS Info tab of the Model Settings dialog. |
buf A buffer into which the subsstring will be placed.
maxbuflen The maximum amount of space that will be used in buf. If this is zero the function will simple return the size of the buffer needed to store the information.
Returns
The length of the buffer needed to store the information requested. Up to maxbuflen of this information will be copied into buf. If maxbuflen is bigger than 2 buf will always be terminated with a double null though information may need to be truncated to do this.
Notes
Most of these calls return a single string. Exceptions are 3,7,9 and 10 which return multiple null terminated string.
The infowanted argument has defined values (eg INFO_WANTED) in vendll.h that you can use instead of numbers if you are working with C/C++.