Scripting & Macros
This

Substitutions in Forms
Macro and Project Substitutions can now be used directly in a form. For example, a Database Name substitution that can be used in multiple forms:
Macro Substitutions are defined under Script | Macro Commands | Utilities | Substitutions Table.
To define substitution variables, and their values, for project-wide use, on the Home tab, in the Projects group: Select Project | Substitutions. This a new feature in this release.
Expressions in Replaceables
Expressions are now supported when specifying macro replaceables.
For example, to filter out the holes in a drillhole display to only show trenches, instead of going into the underlying form and setting an expression on the filter, you can now type %1 in the filter field, save the form and then enter the expression directly in the %1 field in the Macro Editor:
This makes working with filters in macros far more robust and reliable.
Process Search
When you want to insert a process into a macro, rather than have to navigate through the process menus, you can now use a Search function to only show the names of processes that match or partially match the search string you have entered:
Navigation
When opening a macro in the Macro Editor, the first two columns are now frozen by default, making it possible to scroll right without losing the context of the process name and the form set. You can unfreeze rows and columns using the options on the Macro Editor ribbon, in the View group.
Tooltips & Icons
Icons are prepended to the process name to make the process more easily identifiable:
These can be toggled on and off via an option on the Macro Editor ribbon, in the Macros group:
A tooltip is also displayed when you hover the mouse over an entry in the Process or Form columns in the Macro Editor. Process tooltips mimic the tooltip of the corresponding menu item (if any) and the menu path is also shown:
Form tooltips show the name of the form:
Tooltips are also shown for special commands:
Disable/Enable Rows
On the Macro Editor ribbon, in the Macro group, new options allow you to quickly Disable Rows and Enable Rows:
When rows are disabled, the process name is prepended with an exclamation mark (macro comment marker), the process column and the form set column are greyed-out and the row is skipped during execution of the macro. You can still edit the disabled rows.
When already disabled rows are selected, the tool will enable the rows once more. This allows different permutations of a macro to be quickly run and compared.
Comments
In the Macro Editor, comment rows are now highlighted in green. This helps to distinguish between the different sections of a macro.
Error Checking
Cells in the Process and Form columns of the Macro Editor are now displayed in red when an error is detected, for example, when a form number is missing or is invalid. A warning tooltip is shown for unrecognised process names and forms:
The macro cannot be run until errors have been resolved. This enhancement makes it easier to debug your macros.
Errors may also occur when a macro is run. A new "Abort on error "check box on the Run Macro form, allows you to abort the macro in the event of an error:
This sets the default behaviour when the macro starts (the use of an ABORT command in the macro may override it). If an error occurs, a "Macro aborted by user" message is written to the Report file.