Home / Delcam Crispin Help / ShoeMaker / Use Macro menu with delcam crispin

Use Macro menu with delcam crispin

Macros let you create automatic routines for repetitive operations. For example, you might want to loop through all the surfaces in a model and change the colours.

Macros are usually created by recording a sequence of operations. The resulting file can then be edited using a text editor.

For further details see:

Macro > Run

Macro >Step

Macro > Step All

Macro > Continue

Macro > Until

Macro > Abandon

Macro > Record

Macro > Run

Use this option to run a previously recorded macro,

  1. From the Macro menu, select Run to display the Select A Macro To Run dialog.
  2. Select the macro you want to run. Its name appears in the File name text box.
  3. Click on Open to run the macro.

Macro > Step

Use this option to run a macro one step at a time. Any macros which are nested will be run.

Step runs the macro one step at a time, however if there is a macro nested within the macro you are stepping, the nested macro is run. You are then returned back to the macro you are stepping through. A nested macro is one which is initialised within a macro that is already running.

  1. From Macro menu, select Step to display the Select A Macro To Step Through dialog.
  2. Select the macro to step through.
  3. Click Open to begin stepping through the macro.
    • Macros which are nested within the macro you are stepping are run rather than stepped. If you want to step nested macros, see Macro – Step All
  4. Press Enter each time you want to carry out another step.

To stop stepping through the macro, select Macro/Abandon.

Macro > Step All

Use this option to run the selected macro and any nested macros to be run one line at a time.

  1. From the Macro menu, select Step All to display the Select A Macro To Step Through dialog.
  2. Select the macro to step through.
  3. Click Open to begin stepping through the macro.
    • Macros that are nested within the macro you are stepping through, are also stepped through.
  4. Press the Enter ¿key each time you want to carry out another step.
  5. To stop stepping through any of the macros, select Macro/Abandon.

Macro > Continue

Use this option to run the remainder of a stepping macro.

  1. Select Macro > Continue to run the macro. This will run the remainder of the macro rather than step through it.

Macro > Until

The Until command is only available when the macro is stepping.

When issued, the command prompts for a regular expression. It will then run the macro up to and including the first line that contains the regular expression. It will then revert to stepping.

The regular expressions used are based on Perl and are caseless, so if the macro is

if ($error == 1) {
print e1
} elseif ($error == 2) {
print e2
}

the following expressions would all match the last but one line.

print e2

p.*2

PRINT E2

The advantage of this command is that it makes it easier to step through long macros or macros that include modal dialogs. Other techniques to do this require editing the macro.

Macro > Abandon

Use this option to stop a running or stepping macro.

  1. From the Macro menu, select Abandon to stop the macro.

Abandon will only be active if you are currently running or stepping a macro.

Macro > Record

  1. From the Macro menu, select Record to display the Select A File To Record To dialog.
  2. In the File name text box, enter the name of the file you want to record to. If you enter the name of an existing file, it is overwritten with the new commands.
  3. Click Save to begin recording the macro.
  4. Now work through the set of commands you want to record.
  5. To stop recording the macro, select Record from the Macro menu. You can use any text editor to view and edit a macro.

Leave a Reply

Your email address will not be published. Required fields are marked *