THIS 22.1

MACRO Options

MACRO Options

The MACRO menu can be used to play FAST-TCF based macro files on existing T/HIS curves.

T/HIS macro files can be stored in any directory. Each user can define up to three macro areas using the oa_pref option:

this*macro_directory : C:\blah\macros

T/HIS will read any .thm files within the macro directories and generate the macro menu (shown right) using keywords within the macro scripts. T/HIS will search the macro directories in the following order.

this*macro_directory from SYSTEM oa_pref file
this*macro_directory from users oa_pref file
this*macro_directory from local oa_pref file

The scripting for a macro in T/HIS is based upon FAST-TCF using variables within the script (see FAST-TCF section for more details). There are some extra command options to make T/HIS aware of input curves and constants within the macro. These macro keywords are as follows:

macro acr <name> acronym for the macro button in T/HIS
macro title <description> a more descriptive title for the macro
macro curve <curve variable> <curve description> FAST-TCF variable name for input curve followed by curve description
macro const <const variable> <curve description> FAST-TCF variable name for input constant followed by constant description

If one or more macro files are found with duplicate acronyms then only the last file read will be displayed so users can override SYSTEM macros with their own definitions if they want to.

When the user selects one of the Macro functions the macro file associated with the function is read and T/HIS creates a selection menu for the user to define the relevant curve numbers and constant values to input into the macro script. These inputs will replace the variables used within the macro.

For example: If the user selects #1 for the macro curve variable macro_input , then any occurrence of $macro_input in the macro script will be replaced by #1 .

An example macro script follows. This macro asks the user for a filter option (e.g. c60, c600, c1000) and also an input curve number. The macro then filters the input curve and divides by 9810.

# Macro to convert a file to g after filtering
#
macro acr to_g
macro title filter and convert curve to g
macro curve macro_input input curve
macro const macro_filter filter to use
#
model none
model 1
oper $macro_filter $macro_input tag filtered
oper div filtered 9810.0