Configuration File Structure

You are advised to use the Edit Properties dialog in most cases, but there will be times when it is either helpful or necessary to edit properties directly within their text files. Examples include working with hidden files or adding properties that take effect only on restart, as you would if configuring Tag Area Filtering.

Configuration properties are stored within one of the following files according to whether they can be changed dynamically, whether they are workstation specific, or whether they affect VTScada as a whole rather than one application.

Settings.Dynamic

Located in your application folder. This holds the majority of the properties that affect an application without needing to restart the application. Unless you have information telling you otherwise, look to this file first for any given property.

Settings.Startup

Similar to Settings.Dynamic, except that changes to these properties take effect only when your restart your application. Existing properties in this file can be edited using the Edit Properties dialog but if you are adding a "restart required" property you must edit this file to add it here before it can be edited within the dialogs. Properties that require a restart are flagged as such in the documentation.

Workstation.Dynamic and Workstation.Startup

These store the same properties as Settings.Dynamic and Settings.Startup except that the values are overrides that apply only to the named computer. "Workstation" must be replaced by the name of the workstation where these properties will be in effect. Workstation-specific files are stored in a sub-folder of the application. For example, if a property that can change dynamically should have a different value on the machine, RemoteSrv1, you will need
C:\VTScada\BedfordDemo\WorkstationSettings\RemoteSrv1.dynamic

Setup.INI

Located in the top level of the VTScada folders, these affect VTScada in general. Changes can be made only by editing this file using a text editor. Changes do not take effect until VTScada (not just your application) restarts.

Changes made directly to any of an application's configuration files are ignored until an authorized user runs the Import File Changes command.

All configuration files share the same structure:

[SECTION_NAME]
PropertyName = Value
   ; Comments
PropertyName = Value
   ; Comments

<HIDDEN_SECTION_NAME>
PropertyName = Value
   ; Comments

Rules:

  • Section names are marked by square brackets.
  • Hidden sections are marked by angle brackets.
    Hidden sections can be edited within the file but never show in the Edit Properties dialog.
  • Every property must be stored in the appropriate section. Properties stored in the wrong section will be ignored.
  • Property assignments take the form, Name = Value.
    Text values are not enclosed in quotation marks. Quotation marks may be included as part of a label.
  • Comments are both on a separate line, and are marked by a leading semi-colon.
  • Attempting to add a comment after a value, and on the same line as the value, will break the property.

Properties that can be changed without a restart of the application must be stored in the .Dynamic file. Properties that are loaded only on application restart should be stored in the .Startup file. Moving a property from .Startup to .Dynamic does not result in it being able to change without restarting the application.

Hidden Property Sections

Some application properties can never be viewed or edited in the properties list. These are defined in one of the hidden sections within Settings.Dynamic or Settings.Startup. Security defaults (time-outs, group name delimiters, etc.) are examples. Alarm-Area Filtering (covered later in this course) is another.

Hidden sections are those whose section heading is enclosed in angle brackets. <SecurityManager-Admin> is one of these. As a developer, you should be aware of these sections because you may need to edit properties within them, although this tends to be rare.

Direct Editing of Settings.* (and other) Files

A user-copy of both the Settings.Dynamic and Settings.Startup files can be found in every application. For example, C:\VTScada\MyApp\Settings.Dynamic. As a general rule, use the VTScada dialogs to edit configuration properties. It is rarely necessary or convenient to work directly with the files. One exception to that is that changes can be made to the properties in a hidden section only by directly editing either the Settings.Dynamic or Settings.Startup files. Note that none of those changes will have any effect unless subsequently imported by someone whose account has the Edit Files privilege.

Before using the Import File Changes button in the VAM, you are advised to review those changes by using the Import/Export Files page of the Application Properties dialog.

Current (unchanged in code) values shown in yellow. New (not yet imported) values shown in green.

User files have the following attributes:

  • VTScada maintains them, writing updates whenever changes occur in the application. These updates are merged into the files rather than over-writing them.
  • VTScada ignores changes made to user files until an authorized user imports those changes.
  • You can force a write from VTScada to the user files at any time. You have the option of merging changes or of over-writing the user file with the current contents of the working file.

Other Configuration Files

While discussing files that you can edit directly, note that in addition to Settings.Dynamic and Settings.Startup, you may also edit the following:

  • AppRoot.SRC – contains constant definitions and module declarations for your application.
  • Page source files in the \Pages sub-folder - contains the source code defining every page in your application.
  • Image files in the Bitmaps sub-folder – contains your additions to the application's library of graphic images.
  • User-created widgets, pages and tags.
    Just be aware that if you edit the source code for a user-defined tag, it will then count against your license limit.
  • AlarmListFormats.XML Must be copied from the \VTScada\VTS folder to your application before editing. You can use this XML file to modify the columns in the provided alarm lists or to generate a completely customized list format. (Note that while the file will set initial column widths, on-screen changes to the widths are stored with the user-account and do not reload from the XML file.)

User-files that you should never attempt to edit include:

  • Accounts.Dynamic - plain text and intentionally indecipherable by humans. The encoded contents of this file are tied to the application it was generated within and cannot be transferred to other applications.
  • Servers.XML – stores the network server configuration in an XML format. Use the Application Configuration tools to edit this rather than attempting to do so directly.