Report Settings
Table of contents
About
All settings for the report creation is managed by the “Report Settings” object.
Usage
Click “Report Settings” to add the Report Settings object to the model tree. Existing comments “ReportName” and “reportGeneratorPref” are migrated to the object and deleted from the model.
Existing data in the preference file “reportGeneratorPref.py” is used when the settings is added.
- To Import Report Settings from a selected previous version right-click and select “Import Report Settings”.
- To revert any settings right-click and select “Reset Report Settings”.
- To update (and overwrite) the global preference file “reportGeneratorPref.py” right-click and select “Save Report Settings”. A pop-up question “Overwrite existing Report Setting defaults?” prompts the user to confirm or cancel the save. (A backup copy of the app default values are saved in the file “reportGeneratorPrefDefault.py”.)
Import Report Settings
When updating/migrating from a previous version of Report Generator use the “Import Report Settings” to browse for the folder with the preference and Word template files.
The General Settings from the source folder (reportGeneratorPref.py) are loaded to the current Report Settings object. Additional Word template files (except for the default “ReportGenerator.dotm”) are copied to the app folder.
A pop-up window will confirm that the settings are imported and ask to inspected the changes before using the “Save Report Settings”.
If edits are made to the default report template file you must copy it manually to the new app folder. It is recommended to save your version of Word template to e.g. “CompanyReportTemplate.dotm”.
Project Details
The “Details of Project” are now synced with the Report Settings object and custom properties can be enabled/disabled. The Project Details are mapped to corresponding “Word Document Properties” by using the text file “reportGenerator.inp”, written in the Windows temp folder.
Project Details | Word Property | Description |
---|---|---|
Project Title | Title | Project Title. Defaults to the name of the “root” of the model tree. |
Project Subject | Subject | Project Subject or subtitle (i). |
Document ID | Category | Custom property. Can be enabled/disabled in “Edit Project Details” |
Document Revision | Revision | Custom property. Can be enabled/disabled in “Edit Project Details” |
Item Number | Keywords | Custom property. Can be enabled/disabled in “Edit Project Details” |
Project Last Saved | Publish Date | Project Last Saved (Hidden). Read-only property. |
Product Version | Comments | Ansys Product Version (Hidden). Read-only property. |
Author | Author | Project Author (i). |
Reviewer | Manager | Custom property. Can be enabled/disabled in “Edit Project Details” |
Prepared for | Company | Project Prepared for (i). |
Edit Project Details | - | Yes/No (Default) Editor to enable/disable custom properties. |
(i) The property updates the corresponding property in “Details of Project”.
Word Report Settings
Word Report Settings | |
---|---|
Report Name | File name for Word/Html document |
Report Path | Folder name for report. Default projects “user_files” folder. |
Overwrite Report | Yes/No (Default) Set to “Yes” to overwrite without being prompted. |
Word Template | Select one of the available Word report templates. |
Use Word Template Font | Yes (Default)/No Set to “No” to use the Font Style Settings. |
Get Parameters | Yes (Default)/No Set to “No” if not using parameter identifiers in comments. |
Report Name
The Report Name default is the “Project” plus “Subject”.
“FileName.docx” will use linked images. “FileName.doc” will use embedded images.
If using linked images in the report figures and images will only be visible as long as the project user_files folder exist. You may save the images in the Word document and keep the links, see the Figure Features section.
Report Path
The default report save location is the projects “user_files”. Click the Set Report Folder or in the “user_files” field and then “Apply” to open a folder browser window to set the current output folder for the report and image folder.
To revert to the default folder “user_files” click the “Set Report Folder” and then click “Cancel”.
Overwrite Report
To disable the question to overwrite an existing report set “Overwrite Report = Yes”.
Word Template
Select the Word Template file to use. All macro enabled templates, “templateName.dotm”, saved in the extension folder are listed.
The included Word template, “ReportGenerator.dotm”, can be edited by the user to modify front page, heading styles etc. The template is saved in the extension folder, e.g. “%appdata%\Ansys\v231\ACT\extensions\Report Generator V231.4”.
The template uses Visual Basic to work together with Mechanical!
Use Word Template Font
By default paragraph fonts are defined by the Word template. Set this property to “No” to disable the Word template paragraph font and use the styles defined in the Font Style Settings.
When exporting a Html report the “Font Style Settings” are always used.
Get Parameters
The use of parameters in the project may slow down the export due to a “memory leak” bug in Mechanical that may cause a crash. This is a Known Issue.
If the report is not using reference to parameters with the “_parameterTable_” or “_P1_” tag in “Comments” set “Get Parameters = No”. See the section Parameter Table.
Automatic Summary Tables
The following summary tables are available to include in the report as default.
Font Style Settings
Font Style Settings | |
---|---|
Heading Font | Calibri (Default) |
Paragraph Font | Times New Roman (Default) |
Commands Font | Courier New 10pt (Default) |
The font and size settings used for heading, text and command objects in the Html (or Word) report is defined by Font Style Settings.
Selecting an item with only the font name uses the default size in Html (or Word), e.g. “Times New Roman”. Selecting an item with font name and size to override the default size, e.g. “Courier New 10pt”.
The available fonts are: “Default, Arial, Arial Narrow, Calibri, Courier New, Times New Roman”.
The available sizes are: “9pt, 10pt, 11pt, 12pt, 14pt”.
Tip: Start typing the name of a font to filter the list.
The available fonts and sizes are defined in the file reportGeneratorDiacritics.py and can be customized by the user.
The font styles for Tables and Caption are defined in the corresponding section below.
Table Style Settings
Table Style Settings | |
---|---|
Table Align | Default/Left/Center/Right Aligns the table on the page. |
Cell Align | Default/Left/Center/Right Aligns the text in the cell. |
Table Headerline Colour | Light-Blue (Default) Set header line colour from list. |
Table Headerline Bold | Yes (Default)/No |
Table Style | Border 0/Border 1 (Default)/Border 2 |
Table Font | Arial 10pt (Default) |
The available Table Styles are defined in the file reportGeneratorDiacritics.py and can be customized by the user.
Table Headerline Colour
The colour set in the preference file is mapped to the default colors from the colour map below. If a custom colour is used the colour code is displayed instead. Selecting a darker colour will automatically reverse the text colour to white as shown below.
The available colours are defined in the file reportGeneratorDiacritics.py and can be customized by the user.
Caption Style Settings
Caption Style Settings | |
---|---|
Caption Align | Default/Left/Center/Right Alignes the caption on the page. |
Caption Style | Default/Italic (Default)/Bold/Italic Bold Set the caption style. |
Caption Font | Arial 12pt (Default) |
Caption only from Figure Text | Yes/No (Default) Create caption from Figure text (i) |
Table Caption Location | Top/Bottom (Default) |
(i) Caption only from Figure Text
By default the figure caption is created by combining the name of the Figure and the “Figure text” field. To only use the “Figure Text” set this property to “Yes”.
Image Export Settings
The definition of image export is now only made in the Report Settings object independent of the Mechanical Settings. The naming and options are the same as before as used in Mechanical.
Image Export Settings | |
---|---|
Use Current Display | No (Default)/Yes “Yes” uses screen capture and ignore the settings. |
Graphics Resolution | Optimal Onscreen Display (1:1)/Enhanced Print Quality (2:1) (Default)/HighResolution Print Quality (4:1) |
Capture | Image and Legend (Default)/Image Only |
Background | White (Default)/Graphics Appearance Settings |
Font Magnification Factor | 1 (Default) Scale font size in figures. Range from 0.5 to 1.5. |
Graphics Width | 640 (Default) Nominal figure width (in Pixels). |
Graphics Height | 400 (Default) Nominal figure height (in Pixels). |
Chart Width | 640 (Default) Nominal chart width (in Pixels). |
Chart Height | 400 (Default) Nominal chart height (in Pixels). |
The Graphics Resolution is a scale factor used on the nominal figure dimensions.
Word uses 96 dpi resolution so if the document width is e.g. 17 cm the graphics width should be: 96*(17/2.54) = 640.
Report Layout Settings
The Report Layout Settings replaces the need for “reportGeneratorCustom.py”.
Report Layout Settings | |
---|---|
Default Comments | Tabular Editor to create Default Comments names and order. |
Model Objects | Tabular Editor to select Model tree Objects to be automatically “tagged” and renamed and set the report outline Level. |
The “Default Comments” defines a list of the Project level headings and where in this list the “Model Tree” is placed in the report. For each “Comment” there can be a corresponding “CommentName.html” file saved in the extension folder that contains the default text. There can also be “Images” containing the name “CommentName”, e.g. “Introduction_1” that will be added after the comment.
The “Model Objects” defines the list of model tree objects that will be “tagged” when the Report Settings object is added.
For each object a new “Name” may be added (or left blank to use the default name).
The report outline “Level” can be modified, e.g. if “Analysis” should be level 1 (same as “Model”) or level 2 (one level below “Model”). The model objects that is not defined in this list will take the Outline Level according to their relative position in the model tree.
You need to “Save Report Settings” and then remove and add the “Report Settings” object to see the effect of “Default Comments” and “Model Objects Name”.
General Settings
General Settings | Description |
---|---|
Check for new version at start | Yes (Default)/No Enable/Disable app version check at start. |