Macro Create

Use this option to record a series of actions that can then be replayed. The recorded actions are saved, into your current working directory, as a Lava script (extension.lava). This can be quite useful if you find yourself routinely performing the same tasks, or you want to produce a recording for a demonstration. To replay your macro, use the Lava option.

As macros are Lava scripts, you can use your knowledge of Lava to edit macro scripts. Example macro files are included in Appendix H.

It is possible to create macros that record the starting of any menu option, the completion of panels and the creation of points. The Run Command option can also be used to incorporate external programs (scripts) into your macros.

Changes to the view, such as rotating and zooming, cannot be recorded when creating a macro. However, it is possible to record the current view or window. It is also not possible to run a Lava script, or record another macro, while replaying/creating a macro.

Two examples are included at the end of this section.

Note:   As macros are based on panel names, panel contents, and workflows, such as picking objects, macros created in earlier versions may not work in later versions. For example: if a panel included in your macro is slightly different in a later version, then the macro may fail. As this failure may be subtle, you should test your macros in a new version prior to using them.


Instructions

On the File menu, click Macro Create to display the Save Macro As panel.

Name

Enter, or select from the drop-down list, the name for the macro. If you select an existing macro, then you will be asked to overwrite it. The lava extension is added automatically.

Script Language

Select between Python or Perl.

The Macro Control toolbar is then displayed.

There are six (6) different variations of this toolbar. For reference information of the different variations refer to the Macro Control toolbar documentation.

The above variant is always displayed when you start recording a macro.

From this panel you must select your method for dealing with macro mismatches. A macro mismatch is when events were recorded in a different order than the system expects when the macro is being replayed or when the state of the system has changed. For example: when you create points for the first time you need to allocate a layer, however, this is not necessary for subsequent point creations. Thus a macro mismatch is created.

We recommend that you use the Abort on macro mismatch option, as you will then be aware of any errors in your macro.

It is possible to change methods while recording macros if you are between menu options.

Abort on macro mismatch

Terminates the replaying of the macro.

Cancel on macro mismatch

When replaying the macro the menu option that caused the mismatch is cancelled. The macro then continues from the next menu option.

Interactive on macro mismatch

Allows you to deal with the macro mismatch.

Ignore macro mismatches

The macro will continue through its input list until it finds a match.

Once you have selected your method for dealing with macro mismatches, perform the actions that you want to record.

Different variants of the Macro Control toolbar displays depending upon your actions. For reference information on each variation of this panel refer to the Macro Control toolbar documentation.

Although it is not possible to record changes to the view, such as rotating or zooming onto an object, it is possible to record a view and/or set the active window. The Camera button on the Macro Control toolbar to record the view, such as the angle of rotation, slice view etc., as well as the current Vulcan window being displayed, for example Primary Window or Symbol Editor Window. The best way to use this feature is to change to the view you want to record, select File > Macro Create, allocate a name to your macro and then select the Camera button . When you run the macro the view is changed back to the recorded view. A similar effect to saving the view as a numbered view is achieved.

To stop recording, click the Blue Square on the Macro Control toolbar.


Examples