Polish report templates are stored at %PROGRAMDATA%\OctoNus Software\PolishReportTemplates\
. Octonus-supplied polish reports get rewritten automatically whenever required during program updates.
Template structure
Each polish report template is an *.RTF or *.HTM file with some layout and markup, also containing certain placeholders (bookmarks in *.RTF and anchors in *.HTM). Placeholders are intended for particular measurement figures or images. As a report is generated from the template, the placeholders' values are filled in.
Measurement placeholders are initially set to N/A
.
Image placeholders are initially set to some text string containing instructions for the utility that creates images. Typically these include just the image dimensions (and in case of *.HTM reports, also the file name):
*.RTF | *.HTM |
---|---|
|
|
Other image placeholders specify multiple parameters and thus require special processing (more on that later):
*.RTF | *.HTM |
---|---|
|
|
There is one special placeholder called GENERAL_PROPERTIES
which must be present in all templates. Unlike other placeholders, it is not included at all in the resulting report. It contains meta information concerning the template. Below is an example of its content:
[ReportType=PolishRTF;VisibleName=Illustrated report for brilliant;CuttingType=Brilliant;Pictures=POLISH_ANGLES_REPORT_PAV_ANGLES,POLISH_ANGLES_REPORT_CRN_ANGLES]
The content of GENERAL_PROPERTIES
is a string of semicolon-separated key=value
pairs, enclosed in square brackets. The minimally required keys are:
Key | Example value | Possible values | Meaning |
---|---|---|---|
ReportType | PolishRTF | PolishRTF for *.RTF templates,PolishHtml for *.HTM templates | Report type. |
VisibleName | Illustrated report for brilliant | Arbitrary name | Name of the report template to show in the list of available templates within HPOxygen. |
CuttingType | Brilliant |
| Cutting type to associate the template with. |
Pictures | POLISH_ANGLES_REPORT_PAV_ANGLES, POLISH_ANGLES_REPORT_CRN_ANGLES | Any combination of the bookmarks representing pictures (the full list can be found in the Export Report Data templates) | Comma-separated list of bookmarks representing the images which require special processing (see above). |
The meta information extracted from all report templates is stored temporarily in the file called TemplatesCache.ini
. This is an automatically generated file which should never be edited manually.
Creating custom templates
You can make your own report templates by altering the existing ones. To do so, follow these steps:
- Make a copy of one of the standard templates, rename the copied file, and place it to the same folder (
%PROGRAMDATA%\OctoNus Software\PolishReportTemplates\
). - Edit the new template in the following manner:
- Remove the measurement figures and images you don't need.
- If needed, add more measurements and images by copying them from other templates or writing from scratch.
- Rearrange the material the way you need it.
- Make sure the
GENERAL_PROPERTIES
placeholder remains in the document, and change its value as follows:- Edit
VisibleName=
<value>
to the new template name of your choice. - Edit
CuttingType=<value>
to include the cutting type(s) you need. - Make sure to keep the semicolon separators between the
key=value
pairs, and the enclosing square brackets.
*.RTF *.HTM - Edit
- Save the new template.
- Restart HPOxygen.
Alternatively, create a template from scratch as follows:
- Create an empty *.RTF or *.HTM file and place it to the polish report templates folder (
%PROGRAMDATA%\OctoNus Software\PolishReportTemplates\
). - Edit the new template in the following manner:
- Copy the measurement figures and images you need from the existing templates into your document.
- Arrange the material the way you need it.
- Copy the
GENERAL_PROPERTIES
placeholder (a bookmark in case of *.RTF or an anchor in case of *.HTM) from an existing template into your document, and change its value as follows:- Edit
VisibleName=
<value>
to the new template name of your choice. - Edit
CuttingType=<value>
to include the cutting type(s) you need. - Make sure to keep the semicolon separators between the
key=value
pairs, and the enclosing square brackets.
- Edit
- Save the new template.
- Restart HPOxygen.
If the GENERAL_PROPERTIES
placeholder is missing, the report template would be invalid and not visible in the list of options.
If the template is valid, it will appear in the Polish report selection window when the appropriate cutting type is selected. For example, if CuttingType in the template's GENERAL_PROPERTIES
is set to Brilliant, the report will appear in the list whenever Brilliant is chosen in the cutting type selector at the top of the window:
0 Comments