Imatest saved settings (INI files)
Imatest saves settings for several purposes— to locate recently-accessed files, to store calculation parameters, to specify what regions of interest (ROIs) are used, to control how results are displayed, and much more.
Saved settings are also used
- to control Imatest IT (Industrial Testing) modules
- for the merge files used by the Imatest Functional Interface to ensure that runs are made with consistent settings.
New in Imatest 4.2: imatest.ini, rescharts.ini, and multicharts.ini (where saved settings are stored) has been merged into imatest-v2.ini, which is now compatible with non-Latin characters (Asian languages). Changes are described in INI file format changes in 4.2.
New in Imatest 3.10: You can control Imatest with files other than the default imatest.ini by clicking Select INI file (in the INI File Settings dropdown or the window. This can be particularly valuable for testing control files for Imatest IT.
Imatest settings are stored in INI files, which conform to an informal (but widely-used) standard. In normal operation settings are updated whenever an Imatest module is run. But there are cases where it is important to use consistent settings (unaffected by recent runs), for example, when a technician opens Imatest to perform a set task. This page describes how to save and load settings and how to create an Imatest icon that always opens Imatest with the same settings.
Occasionally the saved settings (lines in imatest-v2.ini and the other ini files) become corrupted, and an Imatest module or even Imatest itself may not run. In such cases it may be necessary to remove a line or an entire section— or even reset the imatest-v2.ini file (rarely the best solution because it loses all saved settings). Error handling procedures are described in the Troubleshooting page and in two helpful buttons in the Imatest main window.
opens a window that explains the key functions for viewing and editing Imatest settings. It also displays the full path for imatest-v2.ini (the default settings file) and shows how to fix bugs that can arise when imatest-v2.ini is corrupted. Function buttons include Save settings…, Load settings…, View/Edit settings, Copy settings, Import/Merge settings, Select ini file, INI File Editor, Scan & repair INI file, Functional interface, and Reset Defaults (all).
The default files for storing Imatest settings are
- imatest-v2.ini (for most Imatest modules)
- Prior to Imatest 4.2: imatest.ini (for most Imatest modules), rescharts.ini (for Rescharts), multicharts.ini (for Multicharts).
INI files are updated during Imatest runs when settings are changed in input dialog boxes (Settings windows), in the Settings and INI file settings menus of the Imatest main window, or when the INI file is edited (see below).
You don’t need to know the exact location of imatest-v2.ini in Imatest 3.7+ because Imatest has a full set of utilities for locating, editing, saving, and loading it.
The path name of the default Imatest settings file is
where $APPDATA$ is an environment variable equivalent to C:Usersuser_nameAppDataRoaming In Windows Vista/7 (English). The full English-language Vista/7-10 path name for imatest-v2.ini is C:Usersuser_nameAppDataRoamingImatestimatest-v2.ini. The name may be different in other operating systems and languages.
|INI FILES are text files structured so that
Value may be a number, an array of numbers, or a character string. INI files are readable, but the meaning is not always obvious. See the Imatest INI Reference for more details.
name1 = value1
name2 = value2
; This is a comment.
|EXAMPLEdispwelcome = 1 means display the Welcome screen when Imatest is started.edfile is location of the image editor, used to display saved screens in interactive modules (Rescharts, etc.)||[imatest]
dispwelcome = 1
evalvl = 1
exiftool = 2
expandplt = Min
fontsize = 10
readexif = 1
shrink_largef = 1
acquire = 0
edfile = C:Program Files (x86)IrfanViewi_view32.exe
filecomb = 0
folder = C:ImatestDataSFR
save_dir = C:ImatestDataSFRResults
INI file utilities can be accessed from the INI File Settings dropdown menu in the Imatest main window or by pressing the button. Rescharts and Multicharts have similar dropdown menus for their respective ini files.
Manage Settings opens the Manage Settings window, which contains brief descriptions of the utilities as well as direct links to them.
Save settings… saves imatest-v2.ini in a named file. This is especially useful for cases where you will need to return to the current settings in the future.
Load settings… loads the contents of a named ini file into imatest-v2.ini.
Copy settings copies the contents of the ini file into the clipboard, from which can be pasted (control-C) into emails for error reports.
View/Edit settings opens the ini file in a text editor (usually Notepad). Settings can be searched, edited, and saved. Notepad is NOT recommended for editing ini files because they are now in UTF-8 format (for better handling of non-Latin characters, i.e., better internationalization), which is not handled well by Notepad.
INI File editor (formerly Edit/reset module(s) ) opens the INI file editorINI file editor shown below. It offers a number of conveniences compared to Notepad, like easily locating sections and editing lines within sections. It is particularly valuable for repairing modules that have stopped working (by removing their sections). We often use it for our development work.
Select INI file changes the file used to control Imatest from imatest-v2.ini to a custom file, described below.
Import/Merge INI file merges a file into imatest-v2.ini, overwriting lines in imatest-v2.ini contained in the merge file, but not affecting other lines. This method is often used with Custom icons, described below.
Scan & repair INI file is run when a corrupted INI file is detected (it rarely needs to be started from the Dropdown). INI files sometimes get corrupted when file names contain non-Latin characters. We’ve seen it with Chinese, Japanese, Hebrew, and Korean, and we’ve attempted to fix it by converting INI files to UTF-8 encoding, but it still sometimes happens.) See Troubleshooting— Corrupted INI file for details.
Reset defaults (all) deletes and recreates imatest-v2.ini. All saved settings are lost. This is the last resort in the case of errors: it’s usually better to delete the contents of the section corresponding to a module that won’t run, using the editor described below.
The INI File Editor (formerly Edit/Reset Modules) is used to repair Imatest modules that have stopped working and for creating and editing INI files for controlling Imatest IT (Industrial Testing). It can be opened from the INI File Settings dropdown or from .
INI File Editor
Repairing broken Imatest modules— Open the INI File Editor andselect the section corresponding to the broken module (in the dropdown window that contains [Batchview] in the above image. Unless you can identify a bad line (unlikely, but not impossible using the Imatest INI Reference), click , If you with to cancel your changes, press either or . When you are finished editing, press then .
Creating and editing INI files for Imatest IT— There are two approaches to creating a custom INI file. It’s a matter of personal preference.
- Additive: Create a new file in a text editor. We don’t recommend Notepad (Windows’ feeble default editor) because it has poor support for the UTF-8 encoding. Select sections you want to copy, then press and paste into the new file.
- Subtractive: Click to save the INI file in a (new) named file, then remove unneeded sections using . You can always insert or delete lines with a section.
To edit a line, select it in the large window, make the change in the edit window just above the large window, then press Enter. When you are ready to save the changes press thebutton, which is grayed out until changes are made.
Imatest IT (Industrial Testing) modules are controlled by INI files. It is often useful to test these INI files in Imatest Master (or IS, etc.). Starting with Imatest 3.10, you can substitute a custom INI file for imatest-v2.ini. To do so, press Select INI file in the INI File Settings dropdown menu.
The INI file selection window, for selecting an alternate ini file for running Imatest
- Imatest always starts in the default imatest-v2.ini. To change to another INI file you must open the INI File Selection window (from the INI File Settings dropdown menu or from ).
- Since running Imatest can change the contents of the INI file, we recommend working from a copy of a file used in Imatest IT (not the file you intend to keep).
- Only the main Imatest control file (normally imatest-v2.ini) is affected.
(Note: Starting with Imatest 3.9, consistent settings can be obtained more conveniently with the Imatest Functional Interface.)
Custom icons and shortcuts can be valuable where Imatest must be run using consistent (saved) settings— often by technicians or personnel with limited training in Imatest operations or on computers where several operators test different systems. Since imatest-v2.ini is updated whenever Imatest is run, you can never be sure what the settings are at the start of a new run unless you take the proper steps.
This technique imports data from saved ini files, overwriting only those variables that are included in the ini file, which should be edited to remove all variables that don’t need to be set. For example, folder names, which are ever-changing, probably should be removed from the ini file.
To set up a custom icon,
- Run Imatest under the conditions you you plan to use later. Be sure the correct settings are saved. If you plan to use SFRplus, make sure the settings in the Rescharts SFRplus More settings window (many of which affect automatic SFRplus runs) are correct.
- In the Imatest main window, click Settings, Save Settings…, then save the settings (the current contents of imatest-v2.ini) in a named file.
- Make a copy of the icon or shortcut (in Windows Explorer) used to start Imatest and place the in an appropriate location (the desktop or a folder).
- Rename the new icon or shortcut, as required.
- RIght-click on the new icon. The window shown on the right opens. Targetcontains the instructions for starting Imatest, for example,”C:Program Files (x86)ImatestImatestrun_imatest.bat”(C:Program Files (x86) is the default folder for running 32-bit programs in 64-bit Vista system.)
- Add the full path name for the saved ini file to the Target entry. For example,”C:Program Files (x86)ImatestImatestrun_imatest.bat” “c:imatestdatamiscloadtest.ini”
- Click OK to save the new setting.
There may be situations where it is desirable to lock settings— to disable the user’s ability to change settings that may affect results when running with custom icons or shortcuts. (You’d rarely want to do this with normal Imatest runs). The procedure for doing so is not airtight— but it’s good enough to prevent accidental changes in settings.
Note: This feature has been introduced in Imatest 3.7. It may take some time until it’s fully implemented. Please know if you’d like us to change settings that are or are not locked.
To lock settings, place the following line in the [imatest] section of the saved ini file. (You’ll need to do this using a text deitor: there is no direct Imatest command that does this.)
fix_settings = 1
Removing this line or setting fix_settings = 0 restores normal operation.
When Imatest starts using an ini file with this setting, a number of settings will be disabled. For normal operation, Imatest will need to be restarted using an ini file where fix_settings is omitted or set to 0.