Macros are programs that are designed to help you save time by automating repetitive tasks.
Each macro performs a series of pre-defined steps to accomplish a particular task. The steps should be repeatable and the actions predictable.
For example, you might define a macro to add a grid to your project, to rotate a selected object, or to collect information about the square footage of all the rooms in your structure. Other general examples include:
Revit provides an Application Programming Interface (API) that allows you to extend the functionality of the product. You can add customized commands to the Add-Ins tabExternal Tools panel, or add new panels and tools.
In addition to those API extensions, you can use the API to define macros that run in Revit. We will explain the API differences later in this topic, but for experienced developers, note that you do not need to register the macros in Revit.ini, or add RevitAPI.dll as a reference.
It is very likely that the Revit API will change in subsequent product releases. This means that after installing the next Revit release, you will need to edit and rebuild your macros to reflect the API changes.