In HyperView (HV), HyperGraph (HG) and MotionView (MV) the Text Editor client can communicate with the Plot client. In the Text Editor client, you can access XY data from multiple Plot client windows in a MV, HV or HG session and perform math operations on it using Templex functions. With this functionality, you can create a standard text report in a Text Editor window and save it as a session (.mvw) file or report template (.tpl) file. You can then append or open this file in any MV, HV or HG session and run Templex to quickly create a text report for your XY data.

Here is an example use case for this functionality. You can do this example as it uses a demo Madymo results file located in the HyperWorks (HW) installation. In the example, an acceleration curve is created in a Plot window. A text report is created in a Text Editor window to summarize the head injury criteria for the XY curve. It accesses the curve data in the Plot window and performs math operations on it using Templex.

Note: This example assumes you are familiar with the Text Editor, Templex and setting up page layouts, creating curves, and opening and saving files in the Plot client.

Example: Create text report in Text Editor window and access XY data in Plot window

1. Open MV, HV or HG.

2. Set up a two-window page layout.

3. Set the Plot client for the left window and the Text Editor client for the right window.

4. In the Plot client window, open the following file:
[HyperWorks installation folder]/demos/mv_hv_hg/plotting/madymo/Linacc

5. Plot resultant acceleration for head with time on the X-axis.

6. In the Text Editor window, type the following.
(Two Templex functions – hic and hicd – are in the text below. Refer to HW on-line help for information about them.)

Vital injury criterion parameters of the Resultant Acceleration Curve

1. Head Injury Criterion Value:
HIC Value = {
Hic_value=hic(p1w1c1.x*0.001,p1w1c1.y*1.019716e-01,36,2)
Hic_value[1]
}

2. Modified Head Injury Criterion Value:
HICD Value = {
hicd_value=hicd(p1w1c1.x,p1w1c1.y,36,0)
hicd_value[0]
}

3. Gadd Severity Index:
GSI Value = {
gsi_value=max(integral(p1w1c1.x*1.0,((1.0*p1w1c1.y)^2.5)))
gsi_value
}

Figure 1 below shows what the MV, HV or HG page looks like after typing the above text.


Figure 1 – The HV page before Templex is run in the Text window

7. Save the contents in the Text Editor window as a report template (.tpl) file.

8. Run Templex in the Text Editor window. Refer to the Text Editor window in Figure 2 below to see the result.


Figure 2 – The HV page after Templex is run in the Text window

9. In another MV, HV or HG session, you can open the template file saved in this example and quickly create a text report for the relevant XY data in that session.