Returns Lookup x,y pairs from a.vdf file for a Lookup variable or a subscripted set of Lookup variables.
Restrictions: Must appear directly following the left parenthesis ( that indicates the beginning of a Lookup definition. ‘filename’ and ‘varname’ must be Literals or String variables. start and slope must be numbers, not variables or expressions.
When a subscripted variable name is passed in varname the subscripts are expanded in the context of the current model. For example, if varname is pop[age,gender] then Vensim will look at the subscripts age and gender in the model to determine what elements they have. The variable will then be expanded (say to pop[young,male], pop[young,female], pop[old,male] and pop[old,female]) and the .vdf file will be queried for these names. If a Subscript is not a Subscript range in the model, it will be treated as a Subscript Element (even if it does not appear in the model at all). The variable name itself does not need to appear in the model, nor be subscripted in any specific manner in the model. Subscript range definitions, if any, associated with the vdf file being read are not used.
When a model is checked, GET VDF LOOKUPS reads the values from the .vdf file returning an error if the values are not available. The values are also read each time a simulation is made and a warning is given if the values are not obtainable. In this case Vensim will use the values obtained during the last model check.
NOTE if you make changes in setup mode or specify constant input (.cin) files these values will override the values from the .vdf file. If Stringvars are used to specify the file or variable name to query the model value of these will be used even if these values have been updated using a changes file (or through a Venapp command).
The values in the .vdf file can actually be either Lookups or regular dynamic variables. In the latter case the x axis will be the time axis for the simulation or data in the .vdf file. The x values are adjusted as
x (in model) = start + slope * x (in vdf)
See also: GET VDF CONSTANTS, GET VDF DATA, GET XLS LOOKUPS
Units: GET XLS LOOKUPS is not part of units checking. Specify units for the left hand side variable.
Example
regular lookup((0,0),(1,1))
vdf lookup(GET VDF LOOKUPS('current.vdf','regular lookup',0,1) ~~|
subbed vdf lookup[shape](GET VDF LOOKUPS('current.vdf', 'subbed lookup[shape]',1,0) ~~|
Availability: Not PLE.
Sample model: GET VDF CONSTANTS DATA LOOKUPS.mdl and GET VDF CONSTANTS DATA LOOKUPS[ss].mdl in FunctionExamples