Recording Macros

Macros automate the execution of commands.

Use RecordMacro to start recording a sequence of commands, and StopMacro to stop recording.

Recording a macro is also a quick and easy way to start programming with the DraftSight API, which contains the API calls that correspond to actions performed in DraftSight. The DraftSight API Help identifies the supported macro-recording programming languages and DraftSight interfaces. See the Macro topic in the DraftSight API Help for more information.

To record macros:

  1. Plan the actions, such as mouse clicks and keystrokes, that you want to record before recording the macro.
  2. Do one of the following:
    • On the ribbon, click Manage > Applications > Record Macro.
    • On the menu, click Tools > Macro > Record.
    • Type RecordMacro.
    In the command window, a red circle near the cursor indicates that the recording has started.
  3. Perform the commands you want to record.
  4. To stop recording, do one of the following:
    • On the ribbon, clickManage > Applications > Macro Recording Stop.
    • On the menu, click Tools > Macro > Stop.
    • Type StopMacro.
  5. Type a name for the macro.
You can run the macro in other drawings.