Macros

If you perform a task repeatedly, you can take advantage of a macro to automate it. A macro is a series of functions, written in a scripting language, that you group in a single command to perform the requested task automatically.

In the Interactive Drafting workbench, you can use a macro to automate:

  • the creation of drawing sheets
  • the creation of views in a drawing
    (except Views from 3D)
  • the creation of 2D components references and instances
    (except 2D components from a catalog)
  • the addition of a standard title block to a series of drawings. Refer to Creating a Frame and a Title Block for more information.
  • the printing of a series of drawings.

You can create macros either by recording an interaction sequence (using the Tools > Macro > Start Recording... command) or by editing a file (written in a scripting language) to insert the functions you wish.

You can also modify an existing macro, either recorded or created from scratch, to best fit your needs. To do this, select Tools > Macro > Macros..., select the macro, and click Edit.

Once the macro is created, you can run it by selecting Tools > Macro > Macros..., selecting the macro, and clicking Run.

An example of a macro record and running is provided in Automating 2D Component Instance Creation with VB Script.

For more information on macros, refer to the Recording, Running and Editing Macros chapter in the Infrastructure User's Guide.