Basic Operation

Creating Macro Command Files

The first step in creating macros is to save the various command sequences that perform the desired actions. This can be done in several ways.

One way to save commands for a macro is to save off a command file from an EnSight session. See Record and Play Command (Journal) Files for more information. Be careful as you perform the operations that are saved to the command file. Superfluous or errant commands will slow down macro operation or cause errors. You may wish to view the resulting command files with a text editor and possibly make changes.

A second way to create the command file for a macro is to copy commands from the Command dialog history window:

  1. Mark the desired commands by clicking and dragging in the history window, or by any combination of clicking and dragging while holding down the Ctrl key.

  2. With the cursor over the marked commands, click the right mouse button to bring up the action menu, then select Copy. This will copy the commands to the system clipboard.

  3. Bring up a text editor and insert the commands using Paste.

  4. When you are finished building your macro command file, be sure you save it in the site or local macros directory (see above).

A third way to create a macro command file is by writing/appending them directly to a file from the Command dialog history window:

  1. Mark the desired commands by clicking and dragging in the history window, or by any combination of clicking and dragging while holding down the Ctrl key.

  2. With the cursor over the marked commands, click the right mouse button to bring up the action menu, then select Write/append to file...

  3. A File Selection dialog opens. Select or enter the desired file to save commands to and click Save. If the file already exists, the selected commands will be appended, if it does not, it will be created with the selected commands.

Linking Macro Command Files to Keys

To link a command file in the macros directory to a key or mouse button:

  1. In the Command Dialog Macros tab (FileCommand from the Main Menu), click New.

    The New Macro dialog opens.

  2. Select or type a key,

  3. Check Repeatable if you want the macro to be repeated while the key is held down.

  4. Select any modifier keys such as Ctrl or Alt.

  5. Enter a brief description of what the macro does.

  6. Click Add to add a command file for the macro.

    OR

    Click Add Menu to add the functionality from an existing EnSight menu to the macro.

    A File Selection dialog opens.

  7. Select the desired file and click Save.


    Note:  You can select a file anywhere on your system, and if it is not already in the local .macros directory, it will be copied there.


  8. Repeat steps 6 and 7 for macros with multiple command files.

To Change an Existing Macro Definition

  1. In the Command Dialog Macros tab (FileCommand from the Main Menu), click Edit.

  2. The Edit Macro dialog opens. Change any of the values in this dialog, then click Close.

    Your changes will not be written to the macro.define file until you either click Save Changes in the Command dialog Macros tab, or close the command dialog and answer Yes to the Save Changes query message.