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

Playing Back a Macro

Playing Back a File

Loading a Macro

Saving a Macro

Saving a User Command

Recording a Macro

The procedure is described below for recording operations in eCADSTAR as macros.

  1. On the Quick Access Toolbar, click Macro.
  2. In the Macro dialog, click Start Recording on the toolbar. (Alternatively, click Macro > Start Recording on the menu bar).
  3. In eCADSTAR, run the operations that you want to record.
  4. Click Stop Recording on the toolbar. (Alternatively, click Macro > Stop Recording on the menu bar). The recorded macro is entered into the text box.

 

Note
  • 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.

  1. On the Quick Access Toolbar, click Macro.
  2. 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.
  1. Click Start Playback on the toolbar. (Alternatively, click Macro > Start Playback on the menu bar.) The macro entered in the text box is played back.
  2. 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.

  1. On the Quick Access Toolbar, click Macro.
  2. In the Macro dialog, click Playback File on the toolbar. (Alternatively, click Macro > Playback File on the menu bar.) The Open dialog is displayed.
  3. In the Open dialog, browse to the folder that includes the file. Character codes UTF-8, UTF-16 and UTF-32 are supported.
  1. Select a file to play back, or enter the file name and press Open. The contents of the specified file play back.
  2. 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.

Loading a Macro

The procedure is described below for loading a macro from a file.

  1. On the Quick Access Toolbar, click Macro.
  2. In the Macro dialog, click File > Load Macro on the menu bar. The Open dialog is displayed.
  3. In the Open dialog, browse to the folder that includes the file. Character codes UTF-8, UTF-16 and UTF-32 are supported.
  4. 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.

  1. On the Quick Access Toolbar, click Macro.
  2. On the menu bar, click File > Save Macro. The Save As dialog is displayed.
  3. In the Save As dialog, browse to the folder where the macro will be saved.
  4. Enter an appropriate file name in the File name field. To overwrite an existing file, the file name can be selected from the list.
  5. 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.

  1. On the Quick Access Toolbar, click Macro.
  2. 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.
  3. In the Add User Command dialog, specify the required values in the Icon, ID, Command name and Description fields and close the dialog.
  4. The new User command is listed in the User Command Settings dialog.

 

Note
  • 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.