Configuration File Structure

Configuration properties are stored in one of the following files:

  • 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 restarts.
  • Settings.Dynamic. Located in your application folder. Properties that can be changed without needing to restart the application. These are the majority of the properties that appear in the advanced mode of the Edit Properties panel.
  • Settings.Startup. Similar to Settings.Dynamic, except that changes to these properties take effect only when your restart your application.
  • Workstation.Dynamic and Workstation.Startup. "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:
    C:\VTScada\BedfordDemo\WorkstationSettings\harvie-pc.dynamic

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.
  • 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 should 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 since 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.