Variable Information Files
Variable information for all of the Functions, Procedure, Modules, Subprograms and the main program can be saved to or loaded from a disk file with the Professional license. The file operations are accomplished using the two small buttons at the upper right of the Variable Information dialog.
Variable information is saved in a file having a .VAR filename extension. The information in this file is in tab-delimited ASCII format so that it can be opened, viewed or modified with a word processor or spreadsheet.
Variable information data can be saved to an existing .VAR file. In this case, the file is updated with the current information for the variables that are in use and information for new variables is added. Information in the file concerning variables that are not currently in use is not modified or deleted when the variable information file is saved. For example, suppose you have a program that uses variables X, Y, and Z. You save the variable information to an existing file that already has variable information for variables A, B, C, and X. The information for variables A, B, and C is not altered. The variable information for X is updated to the current settings and variable information for Y and Z are appended to the file.
The Save or Open Variable Information operation will be applied to Functions, Procedures, Modules and Subprograms that are in use when the command is issued.
.VAR files can also be saved with the Save command in the Diagram window, with the $SaveVarInfo directive or with the SaveVarInfo macro command.
There are several important applications for variable information (.VAR) files. The first application is to provide different sets of guess values for a problem that has difficulty converging. Each set of guesses can be stored in a separate file and loaded as needed. A more general application is to use a variable information file to store information for variables that you use repeatedly in your problems. For example, if you commonly use variables T1, T2, and T3 in your problems, you can set their guess values, limits and units in the Variable Information dialog and Save the information in a Variable information file. Then, when preparing your next problem, you can open this variable information file and the guess values, limits and units will be automatically updated. Used in this way, the variable information files provide a similar capability to that available with the Default Variable Information command, but in this case, the saved information does not need to relate to the first letter in the variable name. In addition, variable information files provide a means to copy the units specified in a Function or Procedure in one EES file to another EES file. For example, if you copy the equations in a Function from the Equations window and paste them into another EES file, the units will not be copied with the equations. However, if you also save a .VAR file for this function, the .VAR file can be opened in the new EES file and the units will be automatically attached to the variables in the function.
See also: