Revit API Differences Reference

This reference summarizes the differences between the standard Revit API and the Revit Macro API.

Feature or Capability Standard Revit API Revit Macro API
Declaration Must implement IExternalCommand interface and its Execute method. Declare a public method with no parameters and void return type in the ThisApplication or ThisDocument class.
Application object Access the Application object through externalCommandData.Application The Application keyword in C#, VB.NET, and Python points to the Application object for application-level macros. For document-level macros, Document.Application points to the Application object.
Ribbon API external applications can create RibbonPanels, RibbonItem, PulldownButton and PushButton for each external command through an external application. Not supported.