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):
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 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:
It is possible to specify more than one file, each as a separate parameter, for example:
You may omit the “.savx” extension, so the equivalent of the previous example would be:
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:
Please note that, if a file or path names contain spaces, you need to enclose them with quotation marks, for example:
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:
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.
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:
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:
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:
JSON and YAML files will be created in the same folder as the calculation results files and will have the same name.
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:
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:
When you use one of these parameters, the calculation results window will not be displayed at the end.
To get help on Angle command line parameters, simply run Angle with the “/help” parameter specified: