C/C++ | int VEFCC vensim_get_varnames(const char *filter,int vartype,char *buf,int maxbuflen) ; |
int VEFCC VensimCGetVarNames(int context,const char *filter,int vartype,char *buf,int maxbuflen) ;
Java | public static native String[] get_varnames(String filter, int vartype) ; |
public static native String[] CGetVarNames(int context,String filter, int vartype) ; |
VB | Private Declare Function vensim_get_varnames Lib "vendll32.dll" (ByVal filter$, ByVal varitype As Long, ByVal buf$, ByVal maxbuflen As Long) As Long |
Pascal | function vensim_get_varnames(filter: PChar; vartype:Integer; buf:PChar; maxbuflen:Integer ): Integer ; stdcall ; external 'vendll32.dll' ; |
Use this function to get the names of variables in the model.
Arguments
filter A wildcard filter that operates the same way as Vensim variable selection filter
vartype The type of variable you would like to see. 0 for all, 1 for Levels, 2 for Auxiliary, 3 for Data, 4 for Initial, 5 for Constant, 6 for Lookup, 7 for Group, 8 for Subscript Ranges, 9 for Constraint., 10 for Test Input, 11 for Time Base, 12 for Gaming and 13 for Subscript Constants.
buf A memory location to put the results of the query. Results are stored as a sequence of null terminated strings one following another. A double null is used to mark the termination of the sequence. buf is NULL or maxbuflen is 0 the function just returns the amount of space needed.
maxbuflen The maximum amount of material to put in the buffer.
Returns
The amount of space needed to store the result. -1 if there is an error.
Notes
If the return value exceeds maxbuflen and buf is not null then the results have been truncated. Truncation is always done on complete variable names so that the names returned are all valid.
See Also
vensim_get_varattrib, vensim_get_info