Operations and Macros

The concept of a macro was introduced to the iTool system in IDL 6.1. Macros allow iTool users to record a series of actions for later playback. A related feature, the history of an iTool, lists all actions performed in a given iTool, whether or not actions are currently being recorded. For additional information on macros and history, see Working with Macros (iTool User's Guide).

In many cases, operations you create will automatically be placed in the history (and be available for recording) when a user invokes them. Specifically, if you create an operation with an Execute or DoAction method that does not display a user interface, you do not need to do anything special to ensure that your operation is recorded properly.

If your operation displays a user interface, you must ensure that the SHOW_EXECUTION_UI property of the operation is unhidden. SHOW_EXECUTION_UI is a property of all operations, but it is hidden by default. To unhide the property, insert the following line into the Init method of your operation:

self->SetPropertyAttribute, 'SHOW_EXECUTION_UI', HIDE=0 

The execution user interface must be unhidden to allow user control of the dialog in a macro item for the operation. The default value of the SHOW_EXECUTION_UI property can be set to either 0 (False) or 1 (True); it is only important that the property is visible. When an operation is added to a macro, the SHOW_EXECUTION_UI property for that macro item will be set to 0 (False), regardless of the current setting of the property for the operation itself.

The user interface for your operation should only modify properties of the operation itself. Changes to properties other than those of the operation that are made by the operation's user interface will not be recorded.