Explore Angle

Command line parameters

The new XML-based file format, used in all files created by Angle, allows easy integration with third-party applications (e.g. in-house developed software).

To enable flexible control from other application or batch files, Angle 5 supports a set of command line parameters. As an example, third-party application can create or change input file(s), run Angle, and then obtain the results from the resulting file(s). A very efficient demonstration of this method was used to generate and run nearly 10,000 files in a study on accounting for detector crystal edge rounding (bulletization) in gamma-efficiency calculations (Literature [3]).

The command line syntax for Angle 5 is (square brackets indicate that parameters are optional):

ANGLE [file_name] [/source:file_list] [/output:folder_name] [/samefolder] [/json] [/yaml] [/close] [/shutdown] [/help]

Specifying calculation parameters files

To specify one or more calculation parameters files, you can simply pass their names, and Angle will run calculations for each of them. For example, if you run:

ANGLE params.savx

Angle will automatically start calculations based on the file “params.savx”. The name of the file with results will be the same, except the extension will be “.outx” (“params.outx”, in this case).

To be able to run Angle from command line you will need to either:

  1. Go to the folder in which Angle is installed and run it from there,
  2. Specify the full path to the Angle executable file, or
  3. Add the Angle installation path to the PATH environment variable.

It is possible to specify more than one file, each as a separate parameter, for example:

ANGLE params1.savx params2.savx

You may omit the “.savx” extension, so the equivalent of the previous example would be:

ANGLE params1 params2

If the path is not specified, as in the examples above, Angle will assume the file is in the default folder for calculation parameter files (see Configuration). If calculation parameter files are located in other folder(s), you will need to specify the full path, for example:

ANGLE C:\parameters\params.savx

Please note that, if a file or path names contain spaces, you need to enclose them with quotation marks, for example:

ANGLE "C:\parameter files\file 2.savx"

Specifying the list of calculation parameters files

If you would like to run calculations for many calculation parameters files at once, it would not be possible to pass all the file names as parameters, due to the limitation on the maximal command line length. To be able to do this, you can create a text file containing all file names and pass it using the “/source” parameter. For example:

ANGLE /source:C:\temp\file_list.txt

Each calculation parameters file name should be defined in a separate line. You should not enclose them with quotation marks, even when they contain space characters.

Angle assumes UTF-8 encoding for all files, so if you want to specify file and path names with non-English characters, please select the UTF-8 encoding in your application.

Specifying the output folder

By default, Angle saves calculation results files to their default folder (see Configuration). If you want to specify another folder, you can do it using the “/output” parameter. For example:

ANGLE /source:C:\temp\file_list.txt /output:C:\results

If you prefer to have the calculation results files in the same folder as the original calculation parameters files, you can use the “/samefolder” parameter. In the following example, Angle will run calculations for all files specified in the file “C:\temp\file_list.txt” and put each resulting file in the same folder as the matching source one:

ANGLE /source:C:\temp\file_list.txt /samefolder

Specifying the output format

By default, Angle saves calculation results files in XML files with the “.outx” extension. If you want to save the results also in JSON and/or YAML format, you can use the “/json” and/or “/yaml” parameters:

ANGLE /source:C:\temp\file_list.txt /json

JSON and YAML files will be created in the same folder as the calculation results files and will have the same name.

Specifying the end action

Using command line parameters, you can specify if you would like to automatically close Angle, or even to shut down Windows, when calculations finishes.

To automatically close Angle when the last calculation parameter file is processed, use the “/close” parameter, for example:

ANGLE /source:C:\temp\file_list.txt /close

When you are running numerous files at once, calculations may last for several hours. In this case you may want to use “/shutdown” parameter to automatically shut down Windows when the calculations are finished:

ANGLE /source:C:\temp\file_list.txt /shutdown

When you use one of these parameters, the calculation results window will not be displayed at the end.

Help on command line parameters

To get help on Angle command line parameters, simply run Angle with the “/help” parameter specified:

ANGLE /help