The plug-in library supports two interpreted plug-ins based upon the Tcl and Templex
scripting languages.
Interpreted plug-ins are easy to author and change,
however they may not perform as well compared to a compiled plug-in. The interpreter-based
plug-ins support the Begin, OnRecord, and
End events, and also have functions added to their interpreters to
support table_info, record_info, and
record_action functions. Unlike the C++ plug-in API, no arguments are
passed to these events – they must call the query and action functions that added to the
interpreter.Optional arguments may be passed from XML and queried from the plug-ins using
the
GetOption command. This command has two forms:
- GetOption() - returns the string passed to the plug-in by
specifying the argument “opt_str” in the XML.
- GetOption(key) - accepts a key value will return the value of any
argument that is not interpreted as a functional argument, such as
src, begin, onrecord, etc.
Option strings may contain context variables such as
@current_subcase,
@current_step, etc. The Expression
Builder only supports passing optional arguments to a plug-in by passing values in the
“opt_str” argument (the 1st form).
Important: The
interpreters used by Result Math scripted plug-ins are separate from those that are
included in the HyperWorks application. Variables and
procedures defined in the application are not available to the plug-in
interpreters.