Recording or Playing Back a Macro
The Macro command allows you to record your operations in eCADSTAR as a macro, and play back the recorded macro. You can also save a macro as a User command, and access it subsequently from the Macro drop-down menu, Quick Access Toolbar or the ribbon. Add this command to the Quick Access Toolbar by clicking File > Configuration > Customize the Quick Access Toolbar on the ribbon.
Recording a Macro
The procedure is described below for recording operations in eCADSTAR as macros.
- On the Quick Access Toolbar, click
.
- In the Macro dialog, click on the toolbar. (Alternatively, click Macro > Start Recording on the menu bar).
- In eCADSTAR, run the operations that you want to record.
- Click Macro > Stop Recording on the menu bar). The recorded macro is entered into the text box. on the toolbar. (Alternatively, click
- You can enter comments in the text box by adding the "#" character to the start of the text. Comments are displayed in green in the text box, and are ignored when the macro is played back.
- The extent varies to which you can record functionality as a macro. This depends on the particular operation in eCADSTAR.
- Some operations cannot be recorded.
Playing Back a Macro
The procedure is described below for playing back a macro that is entered in the text box.
- On the Quick Access Toolbar, click
.
- In the Macro dialog, specify a macro in the text box. The following key operations can be used on the keyboard.
Key | Description |
---|---|
BackSpace | Deletes the item that you select in the Macro dialog. |
Del | Deletes the character to the right of the cursor. |
Ctrl + C or Ctrl + Insert | Copies selected text to the clipboard. |
Ctrl + V or Shift + Insert | Pastes copied text from the clipboard. |
Ctrl + X or Shift + Delete | Copies selected text to the clipboard, and deletes it from the Macro dialog. |
Ctrl + Z | Reverses the last operation in the Macro dialog. |
Ctrl + Y | Re-executes the last operation that you reversed using Ctrl + Z. |
← | Moves the cursor one character to the left. |
Ctrl + ← | Moves the cursor one word to the left. |
→ | Moves the cursor one character to the right. |
Ctrl + → | Moves the cursor one word to the right. |
↑ | Moves the cursor up one line. |
↓ | Moves the cursor down one line. |
PageUp (or PgUp) | Moves the cursor up one screen. |
PageDown (or PgDn) | Moves the cursor down one screen. |
Home | Moves the cursor to the beginning of the line. |
Ctrl + Home | Moves the cursor to the beginning of the text box. |
End | Moves the cursor to the end of the line. |
Ctrl + End | Moves the cursor to the end of the text box. |
Ctrl + A | Selects all text in the text box. |
Esc | Clears the items that are selected in the text box. |
- Click Macro > Start Playback on the menu bar.) The macro entered in the text box is played back. on the toolbar. (Alternatively, click
- To stop the macro during playback, click Stop Playback on the toolbar. (Alternatively, click Macro > Stop Playback on the menu bar.) The macro stops running.
Playing Back a File
The procedure is described below for playing back a macro that is stored in a file.
- On the Quick Access Toolbar, click
.
- In the Macro dialog, click on the toolbar. (Alternatively, click Macro > Playback File on the menu bar.) The Open dialog is displayed.
- In the Open dialog, browse to the folder that includes the file. Character codes UTF-8, UTF-16 and UTF-32 are supported.
- Select a file to play back, or enter the file name and press Open. The contents of the specified file play back.
- To stop the macro during playback, click Macro > Stop Playback on the menu bar). The macro stops running. on the toolbar. (Alternatively, click
Loading a Macro
The procedure is described below for loading a macro from a file.
- On the Quick Access Toolbar, click
.
- In the Macro dialog, click File > Load Macro on the menu bar. The Open dialog is displayed.
- In the Open dialog, browse to the folder that includes the file. Character codes UTF-8, UTF-16 and UTF-32 are supported.
- Select the file to load, or enter its file name and select Open. The contents of the file that you specified are loaded into the text box.
Saving a Macro
For a macro that is entered in the text box, the following procedure describes how to save it to a file.
- On the Quick Access Toolbar, click
.
- On the menu bar, click File > Save Macro. The Save As dialog is displayed.
- In the Save As dialog, browse to the folder where the macro will be saved.
- Enter an appropriate file name in the File name field. To overwrite an existing file, the file name can be selected from the list.
- Press Save. If the specified file already exists, then a confirmation dialog is displayed. The macro entered in the text box is saved to the specified file. The character code of the saved file is UTF-8 with "BOM".
Saving a User Command
The following procedure describes how to save a displayed macro as a User command.
- When the User command has been created, you can add it to the Quick Access Toolbar or the ribbon. See: Adding a Report to the Quick Access Toolbar (QAT).
- You can delete the report using the User Command Settings dialog.
- On the Quick Access Toolbar, click
.
- On the menu bar in the Macro dialog, click File > Save User Command. The Add User Command dialog is displayed, and contains the relevant macro text.
- In the Add User Command dialog, specify the required values in the Icon, ID, Command name and Description fields and close the dialog.
- The new User command is listed in the User Command Settings dialog.
- Some macro commands cannot be executed as User Commands. These are typically Export commands.
- To include a macro in the macro list on the Quick Access Toolbar, when it is created in the Add User Command dialog, select Macro Menu in the Location box.
- To add an existing macro to the macro list on the Quick Access Toolbar, select Macro Menu in the User Command Settings dialog, Location column for the relevant macro.
- Macros that you add are saved to the relevant workspace.