About Macro Manager and the Revit Macro IDE

Use the Macro Manager to manage and run your macros.

Macro Manager is the user interface for:

Shown below is the Macro Manager screen:

The tabs indicate the scope or level of a macro.

You add, modify, build, and delete modules and macros from these tabs.

Macros and Modules

A module is an organizational grouping of macros. Macros can be either independent within a module when they run, or share code or utilities with each other. They are arranged in the Macro Manager as follows with the macros organized under their parent module.

Macros within a module are seen and built together. The icons representing the module also show their current state.

Icon Macro State
The module is successfully built, enabled, and loaded. This module is ready to be run.
The module has been edited, but not built.
The module is disabled.
The module failed to build.
Loading the macro failed. Rebuilding the module may resolve this issue.
The module is corrupt.

Application-level and Document-level Modules

Fundamentally, application-level macro tools are written to be useful in any document in nearly any Revit session. Additionally, they do not require a project to be open in Revit to run. This allows you the flexibility to:

Should these uses be implemented, it is good practice to create application-level macros that initiate transactions needed by the macro.

Document-level macros tools are written for specific projects and are saved in the Revit project.

Revit Macro Implementation Languages

You create macros in Revit using the implementation language, C#, VB.NET, and Python. Your selection determines the type of source code template generated and edited in Revit macro IDE.

Macro Project File Locations

When you work in the Revit macro IDE, you must save and build the macros successfully before they will display in the Macro Manager's categorized list. Before we look at an example of the initial code loaded into the Revit macro IDE, let's discuss where macro project files reside on your computer.

Both Application-level and Document-level macro projects are stored in a subfolder of the Revit installation directory:

Document-level macro projects are stored within an RVT file. On disk, when the associated RVT project opens, any built and saved macro(s) are stored temporarily. The Document-level macro files are deleted from your local computer when their corresponding Revitproject document (.rvt) closes.

Now that we have introduced the overall tools and processes, let’s look at the specific tasks.