HG-2010: Create a Plot Macro
In this tutorial you will learn how to create a plot macro and append and use the Vehicle Safety Tools
- Click the Plot Macros icon,
- From the menu bar select
This panel allows you to create macros that produce curves and notes for plots. Plot macros can be used to capture and replay frequently used curve operations such as adding two curves together and filtering curves.
- Define the parameters (variables of type curve or scalar) needed to create the curve.
- Define the curve using the parameters.
- Vehicle Safety Tools
- The vehicle safety tools (VST) are a collection of over 200 macros, Templex functions, and external functions used by vehicle safety engineers. On appending the VST file, seven new menus that contain the macros and functions are displayed on the menu bar: Math, Filter, Units, Injury, Misc, Transforms and Safety Tools.
- Context Sensitive Menu
- When the VST are loaded, you can access its macros by right-clicking on a curve and selecting a macro from the pop-up menu. The pop-up menu can be customized.
To load Vehicle Safety Tools:
- From the menu bar select .
- Select the Vehicle Safety Tools preference file and then click Load.
Define the Macro’s First Parameter
Define the Macro’s Second Parameter
- Click Add to create the second parameter.
- In the Parameter: field, replace the name Parameter2 with SAE J211/1 filter class.
- In the Varname: field, replace the name p_2 with class.
- Set the parameter’s Type: to Scalar.
Define the Macro’s Third Parameter
- Add a third parameter.
- Change the parameter’s name to padding.
- Change the parameter’s variable name to padding.
- Verify Type: is set to Scalar.
Define the Macro’s Fourth Parameter
- Add a fourth parameter.
- Change the parameter’s name to direction.
- Change the variable’s name to direction.
- Verify Type: is set to Scalar.
Define the Macro’s Curve Label
The curve label should be curve.label+" SAE J211/1 "+class.
Define the Curve’s X Vector
The curve’s x vector should be curve.x.
Define the Curve’s Y Vector
The curve’s y vector should be saefilt95(curve.x,curve.y,class,padding,direction).