This appendix explains the role of the STEM.INI file, together with a description of the syntax and entries governing various user options.
When STEM is installed on your computer, a STEM.INI file will be created. This used to be installed in the directory where you installed STEM, but is now virtualised to a copy in your user profile (C:\Users\<name>\AppData\Implied Logic\STEM). The STEM.INI file allows you to modify various aspects of the way the STEM programs work, and also to add commands to the menus of the Editor and Results programs.
The form and syntax of the possible entries is described as follows, with the default settings shown where appropriate. The main options are contained in the section entitled STEM.
STEM
DeferWarnings = N
|
If you find data warnings annoying during the model run, you can set this to Y and the warnings will be written to a file and a single message displayed on the screen at the end of the model run. The default is N.
|
FontInfo = "12,Helv,,b"
|
Specifies the fonts used in STEM data dialogs for labels and values, respectively. For exampe, "10, Times New Roman, iu, b" would give 10-point Times New Roman labels, in italics and underlined. The values would be in bold, except for the summaries printed on time-series buttons.
|
OverWrite = N
|
Determines whether STEM will overwrite a previously existing file without displaying a warning when you select a new name for a model, configuration or workspace. By default, STEM will ask for confirmation before overwriting the previous file. |
ProtectionDir =
|
Path for program authorisation, e.g., C:\STEM.
|
ReportUnallocEquip = N
|
If this is set to Y, then you will be warned if there is any unallocated equipment in the model. The default is N.
|
SlackThreshold = 100
|
Specifies the level of slack equipment in the model which will produce a warning. If the value is between 1 and 100 (inclusive) you will be warned when slack equipment reaches that percentage of the total equipment in the model (by cost). The default is 100.
|
StemPath =
|
Tells all the STEM programs where to look for the others, e.g., C:\STEM. By default, STEM will look for them as follows:
- in the current directory
- in the directory from which the existing STEM program was run
-
down the path set in the PC environment. (To find out what this is, enter PATH at the DOS prompt.)
|
Editor
AllData = N
|
If this is set to Y, double-clicking on an element icon takes you to the ‘top-level’ dialog for that element, which contains buttons for the usual icon-menu data items.
|
AutomaticNames = Y
|
Determines whether you will be prompted to name model elements created from the toolbar, or through copy and paste. By default, STEM assigns automatic names, e.g., Service 1, which you can change later with the icon menu Rename command.
|
CircularReferences = Warn
|
Determines whether iteration is allowed in the Editor. The default is Warn, which means that iteration is allowed, but the Editor displays a status message while it is iterating. The other two options are Disallow (which means that no iteration is allowed) and Iterate (which means that the Editor carries out iteration without displaying a status message).
|
CloseOnMove = N
|
Determines the initial setting of the option Close Dialog on Move within the Options menu. The default is N, which means that a dialog will not close as you move to another, for example by clicking on a button.
|
ConvergenceLimit = 1e 08
|
Defines a proportional change between successive iterations in the Editor, below which STEM will halt iteration. |
CopyExternalLinks = Y
|
Determines what happens to internal references in formulae, when a model element is copied into another model. By default, STEM will create corresponding external references in the copied formula (as long as the first model has been saved). Otherwise the formula will be frozen. |
DataDir =
|
Specifies the default path for opening model files, e.g., C:\Models.
|
Digits = Intl
|
Specifies the minimum number of digits STEM displays after the decimal point of a number. By default, STEM respects the Windows regional/international settings. |
EditFile =
|
Specifies the name of a file to load into the Editor on start-up, e.g., C:\Models\Mobile.dtl, if no file is specified on the command line. It overrides DataDir and EditNewFile.
|
EditNewFile = Y
|
Determines whether STEM will create a new file, if no file is specified on the command line when you start the Editor. If you change this to N, no file will be created until requested.
|
FileList = N
|
Determines whether a list of open files will be appended to the File menu. The default is N, so open files are not added to the menu.
|
IconPath =
|
Specifies the default path for icon files when changing the icon for elements, e.g., C:\Icons.
|
MaxDialog = 10
|
STEM automatically limits the number of data dialogs on the screen: the least-recently active dialog is closed when the number of dialogs on the screen exceeds a certain threshold, which defaults to 10.
|
MaximumIterations = 100
|
Specifies a limit for the number of iterations the Editor should attempt in order to resolve circular references. |
RightAlign = N
|
Determines the initial setting of the Right-align Labels option within the Options menu. The default setting is N, which means that labels in data dialogs are left-aligned.
|
RunPeriodForNew-Model = Y
|
Determines whether STEM will automatically display the Run Period dialog when you create a new model. By default the dialog is displayed.
|
Separators = Y
|
Governs the format STEM uses to display numbers and formulae. You can specify explicit separator characters for lists (or function arguments), decimals and thousands respectively, e.g., Separators = ";,." would display the sum of a thousand and one as sum (1.000,0; 1,0). If you specify N, standard UK separators will be used, i.e., comma, dot and comma, respectively, which will give sum (1,000.0, 1.0). By default, STEM respects the Windows regional/international number format settings.
Note: If you use the same character for your list and thousands separators, e.g., comma, you must be careful to leave a space after the comma between numeric function arguments.
|
TablesFromIcons = N
|
Determines whether tabular dialogs are accessed from element icon menus (where possible). By default icon menus lead to the standard, single-element dialogs. |
"TypeIcon_Collection" =
|
Default icon for Collection elements: filename, index; e.g., STEMICON.DLL, 42.
|
"TypeIcon_Cost
Index" =
|
Default icon for Cost Index elements. |
TypeIcon_Function =
|
Default icon for Function elements. |
TypeIcon_Location =
|
Default icon for Location elements. |
"TypeIcon_Market Segment" =
|
Default icon for Market Segment elements. |
TypeIcon_Resource =
|
Default icon for Resource elements. |
TypeIcon_Service =
|
Default icon for Service elements. |
TypeIcon_Transformation =
|
Default icon for Transformation elements. |
Results
CircularReferences = Warn
|
Determines whether iteration is allowed in the Results program. The default is Warn, which means that iteration is allowed, but the Results program displays a status message while it is iterating. The other two options are Disallow (which means that no iteration is allowed) and Iterate (which means that the Results program carries out iteration without displaying a status message).
|
ConvergenceLimit = 1e-08
|
Defines a proportional change between successive iterations in the Results program, below which STEM will halt iteration. |
DefaultCnf = DEFAULT.CNF
|
Specifies the name of the default configuration file. |
GraphFullName = Y
|
Determines how model names appear on graphs. By default the full path is used. |
MaximumIterations = 100
|
Specifies a limit for the number of iterations the Results program should attempt in order to resolve circular references. |
User-defined menus
You can customise the STEM Editor and Results programs to have additional menu items if, for example, you want to view some data in a spreadsheet program or view STEM.INI in a text editor.
The format is shown below:
[Ed Menu]
MainMenu = SubMenu1,class,command line[,directory]
MainMenu = SubMenu2,class,command line[,directory]
[Results Menu]
…
where
MainMenu
|
gives the text which will appear on the main menu bar. |
SubMenu
|
is the text which will appear on the drop-down menu. |
class
|
is the internal window class of a program already running. |
command line
|
is the full path of a command to be executed, together with any command-line parameters for that command. |
directory
|
is the initial directory for the command. |
If MainMenu is an existing menu, then the sub-menu options will be added to it. All user-defined menus are added on the right-hand side, or bottom of any existing menus, in the order in which they are written in the STEM.INI file.
Putting a ‘&’ before one of the letters in the menu definition causes that letter to be underlined, making it the mnemonic access key for that menu item.
Putting an empty menu item (i.e., MainMenu = ,,,) will cause a separator to be added to the menu.
If class is specified, and there is already a program running with matching window class, STEM will activate it. Otherwise STEM will execute the given command line, replacing a number of special escapes with the following strings:
%c
|
the current model directory, e.g., C:\Models\
|
%m
|
the current model name (without extension), e.g., Mobile
|
%i
|
the full STEM.INI path, e.g., C:\ProgramData\STEM.INI.
|
The format of each menu entry in STEM.INI follows certain layout rules: in particular you should enclose anything that contains commas, spaces or other punctuation in quotation marks. Any errors will cause the entry to be skipped without displaying a warning.
Note: You can add to the drop-down menus, but you cannot change any that are already there.
For example, suppose you wanted to add a new top-level menu called Additions, with items entitled Excel Data and Edit STEM.INI. Then you would need to add the following lines to the [Ed Menu] section of STEM.INI:
Additions = "Excel Data",,"c:\excel\excel.exe c:\data\costs.xls"
Additions = "Edit STEM.INI",,"c:\windows\notepad.exe %i"