Creating Report

Navigation:  »No topics above this level«

Creating Report

Return to chapter overview

To handle reports, use the command "REP: Create Report":

Icon

Ribbon

Tools → Special Data → Report

Keyboard

Textual Menu

<REP>

Tools > Special Data > Report

 

Upon entering the command, a dialog box appears for handling report templates. If the document already contains templates, one of those will be opened in the dialog window. If no template exists in the document, the dialog window will be empty. In this case, the only accessible button will be [New], allowing to create a new report template.

Upon clickin the [New] button, a window appears, in which you need to specify the name of the template being created. The preset default offers the name "Report" with the respective enumerator suffix. Upon clicking [OK], an empty report template will be opened in the command's dialog window.

               

The name of the opened template appears in the "Name" parameter. Using the same parameter, you can open another template by selecting its name from the list. The selected template name can be modified using the [Rename] button.

Once a template is opened, you can view, define and edit its contents and properties.

The contents of the report template is displayed in the preview pane located at the bottom part of the command's dialog. It appears as plain text usually containing the document variables. The names of variables shall appear in the text within braces. The template contents can be edited directly in the preview pane, using context menu commands, or in a separate text editor window. To access the editor window, use the button [Edit…].

The "Preview" checkbox at the bottom of the command window allows viewing the report in the command's dialog pane exactly as it will be written to a file (with or without substituting variable values, depending on property settings defined for the report template).

The method of storing the report is described by the following group of parameters:

Output Path. This parameter defines the file name for saving the report. The button allows browsing for another file.

Auto Save. With this flag set, the report will be automatically saved each time the drawing is saved.

Substitute variables. Defines the method of writing variables to the report. When the parameter is set, the actual current values will be substituted for the variables in the text. When the parameter is turned off, the contents of the template will be written to the report files without replacing variable names by values.

To delete the current template from the document, use the button [Delete]. Upon clicking the button, you would need to confirm the deletion.        

s545        

A created template can be written to the report file right from the command dialog, by clicking [Save]. The following text will be written for the example shown on the figure:

Parameters of the machined part for conductor:

 

Part length: 90

Part height: 50

Number of holes: 1

Hole diameter: 7

Surface slope angle: 10

Chamfer length: 5

 

Example 1. Solution steps of clipped cone unfolding creation task

As a simple example of using the report mechanism together with the command "AN: Animate Model", consider the solution to the task of constructing a clipped cone unfolding.

To create the unfolding, a line tilted with respect to the vertical is created at the cylinder's end face. The line parameter (angle) is defined by the variable "alpha". A horizontal line is constructed through the intersection point of the former line and the circle. A segment is constructed along the intersection line of the horizontal line and the side outline edge of the cylinder. Its length is read into the variable "Length" by means of the function "get".

clip7786        clip7787        

Additionally, a report template was defined in the document for saving the values of the variables "alpha" and "Length". After that, the entire drawing was animated by varying the value of the variable "alpha". In the course of the animation, the variable values were output to the report.

clip7788        clip7789        

Based on the generated report, a database was created in Excel, which was later used for creating a function in T-FLEX CAD defining the unfolding contour.

Report (the file "Report0.rep") 0  81

1  80.9957

2  80.9826

3  80.9609

179  24.0043

180  24

clip7790