The Revit 2022.1 API was recently released and includes some important enhancements addressing new Revit product functionality and developer wishes and requests:
The information below is based on the contents of the Revit Platform API Changes and Additions.docx document included with the Revit 2022 SDK, the software developers kit available from the Revit Developer Centre.
It is also provided in the section on What's New in the Revit 2022.1 API help file RevitAPI.chm
included with the SDK:
For convenient, easy, and effective web searching, this blog post provides a cleaned-up online HTML version of that information with numbering and table of contents added, as well as the following PDF printout of the original document included in the SDK:
The What's New section and the Changes and Additions document provide important information, both for discovering and exploring the newly added API functionality and for later reference.
If you encounter any issues migrating your existing add-ins between different versions, this is one of the first places to look.
For detailed information on all other aspects of the Revit API, please refer to the rest of the API documentation and samples provided in the SDK.
The most important things to install and always keep at hand are:
RevitAPI.chm
Samples\SDKSamples.sln
You will regularly need both for research on how to solve specific Revit API programming tasks.
More in-depth official explanations and background information is provided by the online Revit API Developers Guide included in the Revit 2022 online help.
Here are links to previous discussions of What's New in the Revit API:
I performed a quick diff between this update release and the original Revit 2022 SDK and found no significant differences at all.
Presumably unintentionally, numerous obj
intermediate compilation results were included in the SDK release, so
my first diff was large, 155 KB.
Disregarding the obj
files, however, I end up with only these differences:
-- Revit 2022 : Revit 2022.1 -- includes right-only and differing files: .\getting started with the revit api.docx (Revit 2022.1 is more recent) .\read me first.doc (Revit 2022.1 is more recent) .\revit platform api changes and additions.docx (Revit 2022.1 is more recent) .\revitaddinutility.chm (Revit 2022.1 is more recent) .\revitapi.chm (Revit 2022.1 is more recent) .\add-in manager\autodesk.addinmanager.command.dll (Revit 2022.1 is more recent) .\samples\samplescontent.htm (Revit 2022.1 is more recent) .\samples\samplesindex.htm (Revit 2022.1 is more recent) .\samples\cloudapisample\cs\readme_cloudapisample.rtf (Revit 2022 is more recent) -- 9 files listed
The new enum:
allows you to indicate what information should be copied when duplicating a sheet. Its values are:
The new methods:
allow you to duplicate sheets and identify sheets which can be duplicated.
The new class:
returns the heights of schedule title, column header and each body row on sheet view.
The new method:
will return the heights object.
provide the ability to split schedules and manage schedule segments.
The new method:
will return the schedule sheet instances for a schedule segment.
The new methods:
provide the ability to place a schedule segment on sheet and to get and set the schedule segment instance's segment index.
The new method:
supports deleting of worksets from the model. It takes a DeleteWorksetSettings input with options for what to do with elements contained by that workset.
The new class:
allows user to determine the import options when importing an AXM file.
The new method:
imports an AXM file into the document.
The new method:
checks if the Import FormIt function is available.
The new method:
supports export of Revit geometry to OBJ format. It uses a new class containing the options available for export:
The new methods:
provide support for importing files of STL and OBJ formats. These methods use new classes representing the options for each of the new formats.
The new property:
supports specification of a default length unit to use during import of unitless STL and OBJ files.