Share

PowerMill commands for macros

When you use PowerMill interactively, every menu click and entry in a dialog sends a command to the program. These are the commands that you must enter in your macro file if you want to drive PowerMill from a macro.

This example shows you how to:

  • Find the PowerMill commands to include in your macros.

  • Place them in a text editor such as WordPad.

  • Display the macro in the Explorer.

To create a macro:

  1. Click View tab > Window panel > User Interface > Command Window to open the command window.

  2. Click Home tab > Macro panel > Echo Commands to echo the issued commands in the command window.

    image

  3. To see the commands needed to calculate a block:

    1. Click Home tab > Setup panel > Block > Block.

    2. When the Block dialog opens, click Calculate, and then click Accept.

      The command window shows the commands issued:

      image

      The commands are shown in square brackets; \r should be ignored. The commands you need are: FORM BLOCK, EDIT BLOCK RESET, and BLOCK ACCEPT.

  4. Open WordPad, and enter the commands into it.

    Note: The commands aren't case-sensitive so FORM BLOCK is the same as Form Block which is the same as foRm bLock.
  5. Save the file. The macro is added to the macro tree.

    image

Note: For more information see Running macros.

Was this information helpful?