Record a macro

Operations on RootPro CAD can be recorded as macros to automate repetitive tasks.

  1. Click [Record Macro] on the [Scripts] menu
    The [Record Macro] dialog box is displayed.
  2. Supplemental
    You can also start recording by clicking [Record Macro] on the Script window toolbar.
  3. Enter [Macro Name] and [Description].
    The macro name you enter becomes the filename of the macro.
    The description is saved as a comment at the top of the macro file.
  4. Click [OK].
    Macro recording will start and a message bar will appear at the top of the drawing window indicating that the macro is being recorded.
  5. Do what you want to record.
    The script window shows the code being recorded.
  6. Supplemental
    You cannot undo or redo while recording a macro.
    Most operations on RootPro CAD are recorded, but the following operations are not recorded.
    • User Defined Hatch
    • Search and Replace of Text and Component
    • Print Preview
    • OLE Object Insert
    • Selection Tracker
    • Screen Display Command
    • Rearrange Windows, Tab Groups
    • Docking Windows, Toolbars
    • View Controller
    • Import / Export Settings
    • File Properties
    • Unsaved Automatic Backup Files
  7. Click [Stop Recording] on the [Scripts] menu.
    Macro recording ends, and the contents of the operation are saved as a macro file.
  8. Supplemental
    You can also stop recording by clicking [Stop Recording] on the message bar at the top of the drawing window or the toolbar of the script window.
    Macro files are stored in %USERPROFILE%\Documents\RootPro CAD\Macros. Macro files have the extension .csx, the same as script files.

Related topics