File formats

Angle 4 utilizes a completely new format for all file types. Instead of a proprietary binary format, now all Angle files are text files based on the XML syntax (Extensible Markup Language). Thus, all Angle files can now be easily used from third-party applications, such as in-house and ad hoc built software, as well as spreadsheet and word processing software.

Being simple text files, they are also human-readable, so you can use a text editor to view or edit them.

Although Angle files can be opened with spreadsheet or word processing software, it is not recommended to use them for modifications. Please use text editors, instead.

Angle 4 is a multi-language application, and it uses the Unicode standard to be able to display and use all international characters. All files created by Angle are UTF-8 encoded, which is the most common encoding used today. If you want to use non-English characters, please be sure to use UTF-8 encoding in your text editor or application.

The first 128 characters in UTF-8 standard are the same as in 7-bit ASCII. This means that you can use any text editor, even those not supporting UTF-8 encoding, as long as you use only English letters.

Angle file structure

The structure and naming in Angle files are pretty straightforward, so one can read and understand them without much effort. Here, we will explain the structure of all the file types in Angle.

To keep it as simple as possible, here we will not use any XML Schemas to describe the formats of XML documents, but plain words.

In our examples we will use blue letters to distinguish XML elements, attribute names will be displayed in red letters, and their values in purple. Comments will be displayed in green letters. Mandatory elements and attributes will be in bold.

XML is case sensitive, so be sure to use exact tag and attribute names as specified. This is also important for predefined values, such as detector types.

All attribute values must be enclosed with quotes. Different types of values are indicated by the following abbreviations (in italics):

  • str – Non-empty string (text).
  • str0 – String, which can be empty (i.e. zero-length).
  • float – Positive real number.
  • float0 – Non-negative real number.
  • int – Positive integer number.
  • bool – Logical value: only “yes” or “no”.

Decimal separator for real numbers is a point (“.”), regardless of the settings on your computer.

Angle displays numbers according to your system settings. But, regardless of your settings, all files use the point character as a decimal separator, to maintain the compatibility among different computers and users.

The first line in every Angle file is the same and it defines the XML standard and encoding used, followed by a single “angle” element, which encloses the rest of the document:

<?xml version="1.0" encoding="utf-8"?>
<angle generator="ANGLE" version="4.0" units="mm">
  ...
</angle>

The element “angle” must have three attributes specified:

  • generator: Must have the value of "ANGLE".
  • version: Minimum version of Angle required to open the file.
  • units: Units of length used in the file. Allowed values are: “mm” (millimeters), “cm” (centimeters) and “in” (inches).