Timing Analyzer GuideChapter 4: Using the Timing Analyzer
Using Macros
A macro command is a script file for running Timing Analyzer commands and options. You can create a macro, save it in a new file, the same file, or another existing file, and run it in the Console window. The Timing Analyzer records all commands executed during the current session.
Creating a Macro
To create a macro, perform the following steps.
- Select View
Console to open the Console window.
Alternatively, you can create or edit a macro manually or create one by entering keyboard commands in a text file.
- From the menus, select the commands that will constitute the macro or type keyboard commands in the field at the bottom of the window.
These commands are recorded in the Console window numerically. See the Command Line Syntax chapter for listings, descriptions, syntax, abbreviations, and examples of keyboard commands.
- Select File
New Macro or click the New Macro button.

A New Macro window appears.
- In the Console window, hold down the left mouse button and highlight the sequence of commands that will constitute the macro.
- Click the Copy Button.

- Position the cursor in the New Macro window and click the Paste Button.

The lines from the Console window are pasted into the New Macro window.
You can also highlight, copy, and paste individual lines from the Console window to the New Macro window.
You can add text in the New Macro window by inserting the cursor and typing. Delete text by pressing the backspace key or by highlighting and pressing the Delete key.
- Save the new macro by following the instructions in the Saving a New Macro section.
Saving a New Macro
To save a new macro, follow these steps.
- Make sure the macro that you want to save is the active window by clicking on it. The active window has a colored border.
- Select File
Save, or click the Save button.

The Save As dialog box, appears as shown in the Save As Dialog Box figure of the Menu Commands chapter.
- In the Look in/Directories list box, select the directory in which you want to save the macro.
- In the List Files of Type field, make sure that Timing Analysis macros (*.xtm) is selected. (File names of that format appear in the list box below the File Name field).
A default name corresponding with the type of information contained in the window (timing constraints, clocks, and so forth), with an .xtm extension appears in the File Name field.
- In the File Name field, type in a name for your new macro.
You must save the macro in a file with an .xtm extension.
- Click OK.
The Save As dialog box closes. You can use word processor applications to open and edit the report file.
Running a Macro
Follow these instructions to run an existing macro.
- Select File
Run Macro.
The Run Macro dialog box appears as shown in the Run Macro Dialog Box figure of the Menu Commands chapter.
- In the Look in/Directories list box, select the directory in which the macro file is located. All macro files with an XTM extension are listed in the list box.
- Click on the macro file in the list box that you want to run.
- Click Open.
To run a macro already displayed in an editor window, follow these instructions.
- Click on the window to make it the active window.
- Click the Run Macro toolbar button.

Editing a Macro
You can also edit an existing macro.
- Select File
Open.
The Open dialog box appears and is shown in the Open Dialog Box figure of the Menu Commands chapter.
- In the Look in/Directories list box, select the directory in which the macro file is located.
- In the List Files of Type field, select Timing Analysis Macros (*.xtm) from the pull-down list box.
- In the File Name field, type in the name of the macro file that you want to open. Alternatively, click on the name of the XTM file in the list box above the File Name field.
- Click OK.
The Open dialog box closes, and the macro window opens and remains active.
- Edit the macro, using the information in the Creating a Macro section to add, delete, copy, and paste commands in the macro window.
- If you want to save the edited macro in the same file, select File
Save, or click the Save button.

If you have saved the macro once, the Save command saves the macro in the existing file without activating the Save As dialog box.
If you want to save the edited macro to another file, follow the instructions in the Saving an Edited Macro to a New File section.
Overwriting an Existing Macro
If you want to save an edited macro in the same file, follow these steps.
- Make sure the macro that you want to save is the active window by clicking on it or opening the macro file.
- Select File
Save, or click the Save button.

The Save As dialog box appears as shown in the Save As Dialog Box figure of the Menu Commands chapter.
- In the Look in/Directories list box, select the directory in which the existing macro is located.
- In the List Files of Type field, make sure that Timing Analysis macros (*.xtm) is selected. (File names of that format appear in the list box below the File Name field).
- In the File Name field, type in a name of the existing macro, or click on that file name in the list box below the File Name field.
- Click OK.
The Timing Analyzer displays a prompt box asking if you want to overwrite the existing file, as shown in the following figure.

Saving an Edited Macro to a New File
Follow this procedure to save an edited macro to another file.
- Make sure the macro that you want to save is the active window by clicking on it or opening the macro file.
- Select File
Save, or click the Save button.

The Save As dialog box appears, as shown earlier in Save As Dialog Box figure of the Menu Commands chapter.
- In the Look in/Directories list box, select the directory in which you want to save the macro.
- In the List Files of Type field, make sure that Timing Analysis macros (*.xtm) is selected. (File names of that format appear in the list box below the File Name field).
A default name corresponding with the type of information contained in the window (timing constraints, clocks, and so forth), with an .xtm extension appears in the File Name field.
- In the File Name field, type in a name for new macro.
You must save the macro in a file with an .xtm extension.
- Click OK.
The Save As dialog box closes. You can use word processor applications to open and edit the report file.
Suppressing Informational Messages
When you run a macro, the commands in the macro file can generate informational, confirmational, and error messages. However, you can suppress the informational and confirmational messages by using the following procedure. You cannot suppress these messages while executing menu commands. This command does not have an equivalent menu command.
- Open a design, as described in the Opening a Design section.
- Select View
Console.
The Console window appears.
- In the field at the bottom of the Console window, below Show Command Status, type the following command.
SetForce on
- If you are creating a new macro or editing an existing one, follow the procedure in the Creating a Macro section, inserting the SetForce on command when you want to suppress messages. (For example, after opening a design.)
- Select File
Run Macro, or click the Run Macro Button.

- To restore the informational and confirmational messages, type the following command in the Console window.
SetForce off