What's New in the Revit 2024 API

The Revit 2024 API contains significant changes and enhancements for add-in developers:

Top level table of contents:

Information Sources

The information below is based on the contents of the Revit Platform API Changes and Additions.docx document included with the Revit 2024 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 2024 API help file RevitAPI.chm included with the SDK:

Revit 2024 API help on What's New

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 with table of contents and page numbers added:

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:

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 2024 online help.

What's New in Previous Versions

Here are links to previous discussions of What's New in the Revit API:

Detailed Table of Contents

1. API Changes

1.1. CefSharp upgrade

Revit and Autodesk add-ins use the CEFsharp library internally for several features. Some third-party add-ins do so as well. Occasionally, when different versions of the library are used, it leads to instability issues for Revit. In order to avoid version conflicts, we are clarifying what CEFsharp version is being used, and loading it prior to all add-in initializations.

1.2. Upgrade ElementId Storage to 64-Bit

The internal storage of Autodesk.Revit.DB.ElementId was updated from a 32-bit integer to a 64-bit size value (long long in C++/CLI, long in C#).

This resulted in changes to the ElementId class and members and some other tools.

The new property:

allows users to provide the value of the ElementId as System::Int64 The new constructor:

allows users to create an ElementId handle with the given Int64 id.

1.2.1. Changes to pre-existing enumerated types

To support storage/conversion of Autodesk.Revit.DB.BuiltInCategory as an Autodesk.Revit.DB.ElementId, the underlying type size of the enum was upgraded from 32-bit to 64-bit.

1.2.2. Binary breaking change to the Autodesk.Revit.DB.BuiltInParameter enumeration

To support storage/conversion of Autodesk.Revit.DB.BuiltInParameter as an Autodesk.Revit.DB.ElementId, the underlying type size of the enum was upgraded from 32-bit to 64-bit.

1.2.3. Changes to other APIs

Support was added for System.Int64 types to Extensible Storage.

1.2.4. Changes to decal properties

The decal asset properties named decalelementId and materialId are changed from type AssetPropertyInteger to AssetPropertyInt64.

The code that would find these properties and then use them as AssetPropertyInteger/ AssetPropertyType.Integer type should be changed to use them as AssetPropertyInt64 / AssetPropertyType.Longlong type. For example:

  AssetPropertyInteger decalElementIdProp
    = (asset.FindByName("decalelementId")
      as AssetPropertyInteger);

  if (decalElementIdProp.Type == AssetPropertyType.Integer)

should be changed to

  AssetPropertyInt64 decalElementIdProp
    = (asset.FindByName("decalelementId")
      as AssetPropertyInt64);

  if (decalElementIdProp.Type == AssetPropertyType.Longlong)

1.3. Replacement of TopographySurface with Toposolid

TopographySurface and SiteSubRegion elements have been superseded as of Revit 2024 by a new element Autodesk.Revit.DB.Architecture.Toposolid and related classes. It is recommended that all newly created elements and modifications operate from the new Toposolid class. The TopographySurface element remains in the API for backwards compatibility and upgrade.

As a result of this change, the following methods are marked as deprecated:

1.3.1. Point Visibility Settings

The new class:

offers tools to control the point visibility for SlabShapeEditor based elements (floors, roofs and toposolids) on a per-category basis.

1.4. Family API changes

1.4.1. Placement of Level based instances in family documents

The API for placing new family instances for level based families was available in previous releases but could only be used in the project environment.

The method:

has been moved to the Autodesk.Revit.Creation.ItemFactoryBase class and can now be accessed in both family and project documents using the appropriate version.

1.4.2. FamilyManager

Deprecated member(s) → Replacement member(s) FamilyManager.AddParameter(ExternalDefinition, BuiltInParameterGroup, bool) → FamilyManager.AddParameter(ExternalDefiniti on, ForgeTypeId, bool) FamilyManager.AddParameter(string, BuiltInParameterGroup, Category, bool) → FamilyManager.AddParameter(String, ForgeTypeId, Category, bool) FamilyManager.ReplaceParameter(FamilyParameter, ExternalDefinition, BuiltInParameterGroup, bool) → FamilyManager.ReplaceParameter(FamilyPara meter, ExternalDefinition, ForgeTypeId, bool) FamilyManager.ReplaceParameter(FamilyParameter, string, BuiltInParameterGroup, bool) → FamilyManager.ReplaceParameter(FamilyPara meter, ExternalDefinition, ForgeTypeId, bool) FamilyManager.IsUserAssignableParameterGroup(BuiltInParameterGroup) → FamilyManager.IsUserAssignableParameterGroup(ForgeTypeId)

1.5. FamilyInstance API changes

The behavior of the following methods has changed. When the Phase does not apply to the FamilyInstance (e.g., FamilyInstance for annotation), they now return null instead of throwing InvalidOperationException.

1.6. Removal of Open ADSK workflow

Open ADSK functionality has been removed from Revit, including the associated API:

1.7. ImportExport API changes

The base class

was renamed to BIMExportOptions to better reflect the purpose that it serves in the export options hierarchy. No functionality was changed.

1.8. Copy/Paste API changes

The Copy/Paste API has been improved to support several new scenarios in Sketch Edit Mode. Method signatures remain unchanged.

The method:

can now be used to copy sketch members from a sketch to the main document.

Additional supported copy/paste cases:

1.8.1. Additional validation for Copy and Mirror API

The methods:

have had additional validation added to handle copying within or between sketches. All copied elements must come from the same sketch. Also, to paste elements into a sketch, that sketch must be within sketch edit mode.

Additionally, copying between two sketches is only allowed if the sketches are parallel. This validation has been applied to all copy methods.

1.9. Correction of deprecation of Mass Level Data API

The class:

was mistakenly marked for deprecation in Revit 2023, but the class is still applicable, so it is now no longer marked for deprecation.

1.10. Schedule API changes

1.11. UI API Changes

The DefaultTheme property allowed users to read or write the theme type from .ini file. The new property CurrentTheme has been extended to have similar function, so deprecated DefaultTheme to avoid the functional overlap.

1.12. Structure API changes

The following members will now throw InvalidOperationException if the load is un-hosted:

1.13. Fabrication API changes

Some flow-related parameters are renamed.

1.14. DirectShape API changes

You can now provide an external tag to reference geometry. There is a change in behavior for the following methods:

Methods which accepted an Autodesk.Revit.DB.DirectShapeReferenceOptions argument will now associate an external ID with the added reference object, if the options specify one. An exception is thrown if the DirectShape or DirectShapeType already has reference geometry with the specified external ID.

1.15. Parameter API changes

1.15.1. Element.Parameters

The method Element.GetOrderedParameters() is compiled as the current description but the order of the parameters has changed. The parameters are returned in the order in which they appear in the Revit UI within a given group but order of grouped is changed. It is not defined in documentation.

1.15.2. Shared Parameters

1.15.3. Parameter Definition

1.15.4. Parameter Binding

1.15.5. Parameter Utils

1.16. Obsolete API removal

The following API members and classes which had previously been marked Deprecated have been removed in this release. Consult the API documentation from prior releases for information on the replacements to use:

1.16.1. Classes

1.16.2. Methods

1.16.3. Properties

1.16.4. Enums

2. API Additions

2.1. Element Iteration API additions

The new constructor:

creates a FilteredElementCollector set to iterate the visible elements in a Revit link instance in a certain view of the host document. Elements returned by iteration of this collector will be from the Revit link instance's document.

2.2. Filled Region API additions

Added functionality that allows users to create either a masking region on a sketch plane in a 3D model family or a view specific masking region from the given boundaries.

The new methods:

2.3. Analysis API additions

2.3.1. Analytical surfaces in the energy model

Several new classes were added in the Autodesk.Revit.DB.Analysis namespace that allows users to retrieve thermal properties and material layers for analytical constructions and window types associated with analytical surfaces in the energy model. All thermal properties on EnergyAnalysisConstruction and EnergyAnalysisMaterial should be read-only.

The new classes:

The new values available for energy analysis enumerated types:

2.3.2. Energy Analysis Surface

The new properties:

allows users to identify the originating Revit element's id and name.

The new method:

allows users to get the analytic construction this surface is associated with.

2.3.3. Energy Analysis Opening

The new properties:

allows users to identify the originating Revit element's id and name.

The new methods: - EnergyAnalysisOpening.GetConstruction() – Allows users to get the analytical construction this opening is associated with. - EnergyAnalysisOpening.GetWindowType() – Allows users to get the analytical window type this opening is associated with.

2.3.4. Energy Analysis Construction

The new property in EnergyAnalysisConstruction indicates if this originated from a schematic or analytical construction.

2.3.5. EnergyDataSettings

The new property:

returns true only if elements visible in the currently active view are used for generation of Energy Model, false otherwise. This setting is ignored if the currently active view is not a 3D view or AnalysisType is RoomsOrSpaces.

MEP Duct/Pipe pressure loss calculations

Users can now access the flow/pressure values and use them to create customized reports and tools. This includes all design and fabrication flow/pressure calculations.

The new classes:

2.4. Structural Analytical Model API additions

2.4.1. Analytical to Physical Associations

The following new methods in AnalyticalToPhysicalAssociationManager allow users to distinguish if it's an analytical or a physical element.

The following new methods in AnalyticalToPhysicalAssociationManager allow users to add and retrieve an association between a group of analytical elements and a group of physical elements.

The new property:

allows users to indicate if associations between Analytical and Physical Elements should be created automatically.

2.4.2. Structural Analytical Model Elements

The new method:

creates and returns new AnalyticalPanel from a curve and an extrusion direction.

2.5. 3D View API additions

The new enum:

corresponds to the values of the parameters Autodesk.Revit.DB.BuiltInParameter.VIEW_BACK_CLIPPING and VIEWER_BOUND_FAR_CLIPPING.

2.6. DirectShape API additions

These additions enhance the ability to add reference geometry and externally tagged geometry.

2.6.1. DirectShapeType

Several new methods in Autodesk.Revit.DB.DirectShapeType allow removing or tagging references:

2.6.2. DirectShapeReferenceOptions

Three new methods have been added to Autodesk.Revit.DB.DirectShapeReferenceOptions:

2.6.3. DirectShape

Similar to DirectShapeType, Autodesk.Revit.DB.DirectShape has the following new methods:

2.7. Detailing API additions

2.7.1. Detail element draw order

The new method:

allows you to understand the sorting of the given element ids by their detail draw order in the provided view.

2.8. Selection API additions

2.8.1. UI Application

The new class:

The new event:

subscribe to the new event ThemeChanged to be notified after the theme was changed. This event is raised after the theme was changed.

2.9. 3D Shape API additions

The new method:

allows users to compute and returns the surface area of the mesh. The surface area is the sum of the areas of the constituent facets of the mesh.

2.10. Reinforcement API additions

2.10.1. Rebar

Added the ability to control the behavior of the free form rebar when pressing space. The new members:

Added the ability to set different orientation methods for an Aligned Free Form Rebar. The new members:

Added the ability to identify the direction for a positive offset value for a Rebar-to-Rebar constraint.

The new method:

2.11. Parameter API additions

The new Element methods support getting all parameters of an element or specified parameters of an element in one call.

The new class:

represents the type and value of a parameter returned from methods that extract multiple parameters and their values at once. The new members below provide access to the information about the extracted parameter & value:

2.12. Slab API additions

The new enum:

2.13. Groups API additions

2.13.1. Group Load Options

The new class:

provides options for loading the Revit group from the file.

The new methods:

allows you to set or retrieve a duplicate type names handler. If this value is not set, the default handler is used. It returns null if none is set.

It has the following properties:

2.13.2. Group Type

The new method in GroupType allows the user to replace the group with the contents of the input file.

2.14. Link Visibility/Graphic Override API additions

The new class:

represents settings to override display of Revit link in a view.

The new methods:

It has the following properties:

2.15. Purge unused elements API additions

The new methods in Autodesk.Revit.DB.Document allows users to get unused elements. These methods return unused element Ids that are available in the Purge Unused window in Revit.

Regarding the difference between the two functions – For certain categories, you must leave at least one type in the document, even if it is not "in use." GetUnusedElements() will reserve one for you if applicable. GetAllUnusedElements() returns the full list and allows you to choose what to keep.

2.16. Parameter API additions

2.16.1. ParameterDownloadOptions

The new class:

is an option class used for downloading parameters from the Parameters Service. It has the following properties:

2.16.2. ParameterUtils

The new methods:

2.17. Electrical Analytical API additions

2.17.1. ElectricalAnalyticalLoadSet

The new class:

It has the following methods:

It has the following properties:

2.17.2. AreaBasedLoadData

The new methods:

2.17.3. PointLoadData

The new property:

2.17.4. ElectricalAnalyticalNode

The new method:

2.17.5. ElectricalLoadClassification

The new property

2.18. Structural API additions

2.18.1. Bending details in view

Added functionality that allows users to create, move, rotate bending details and to get/set the rebars that they represent. The class RebarBendingDetailType represents the type for the bending detail, allowing users to set its appearance.

The new classes:

The new enums:

allows users to describe how the parameters with multiple values will be represented. It has the following values:

allows users to describe the level of detail in which the Bending Detail will be represented. It has the following values:

The new method:

2.18.2. Path Alignment Options for Free Form Rebar API

The new Enum Autodesk.Revit.DB.Structure.AlignedFreeFormSetOrientationOptions provides orientation options for Aligned Free Form Rebar set. It has the following values.

2.18.3. LoadBase

The new methods:

2.18.4. LineLoad

Three new methods support custom line loads:

2.18.5. AreaLoad

Several new methods support custom area loads:

2.18.6. PointLoad

Two new methods support custom point loads:

2.18.7. Loads Display Scaling

The new methods:

returns the representative line of the load force vector.

allows users to set values for loads display scaling by providing two load forces and their corresponding length of the representative lines in internal units.

The new property:

represents whether to use loads display scaling. If disabled, loads are displayed according to force scale type parameters.

2.18.8. Schedule Custom Field

We now provide a new type of field in schedule. For this field type the value for each row is computed based on the (sub)elements that are grouped on that row and can have a graphic representation when the schedule is placed on a sheet.

The new class:

represents the properties of a Bending Detail Custom Field.

It has many properties. (Please see the RevitAPI.chm for full documentation.) Some notable ones include:

The new enums in BendingDetailCustomFieldProperties:

2.19. FilledRegion API additions

Several new methods have been added to Autodesk.Revit.DB.FilledRegionType:

2.20. Fabrication API additions

The new class for mapping fabrication services to Revit fluid types and temperatures.

represents the settings that specify the fluid type and temperature for fabrication service. The values are used in the fabrication flow and pressure drop calculation.

It has the following methods:

It has the following properties:

2.21. Schedule API additions

2.21.1. ViewSchedule

Users now have the ability to resize schedule rows.

The following new properties have been added to ViewSchedule:

The new enum:

describes the options for overriding schedule body row heights. It has the following values

2.21.2. ScheduleableField

In order to support the ability to define a custom field in the schedule for any element category, new members were added to SchedulableField class. The new methods: - SchedulableField.SchedulableField() – Allows users to create a new SchedulableField whose type is CustomField and which is identified by the input GUID. - SchedulableField.GetCustomFieldData() – Allows users to get the data associated with this custom field. If this field isn't a ScheduleFieldType.CustomField, it will return null. The new property: - SchedulableField.VerticalAlignment – Represents the vertical alignment of the column's data.

2.21.3. Scheduling Revision Clouds

Users can now schedule revision clouds. They can also schedule the view name and sheet info for revision clouds.

The new values for enum Autodesk.Revit.DB.ScheduleFieldType:

2.21.4. HostCount

We have also added the ability to identify the HostCount in Autodesk.Revit.DB.ScheduleFieldType:

2.21.5. Vertical Alignment of Schedules

The new enum:

represents the vertical alignment of data in a schedule.

2.21.6. Custom Field API additions

We now provide a new schedule field type: the custom field. For this field type, the value for each row is computed based on the (sub)elements that are grouped on that row. It can have a graphic representation when the schedule is placed on a sheet.

The new class Autodesk.Revit.DB.CustomFieldData allows users access to the information about a custom field.

It has the following properties:

It has the following methods:

The new interface Autodesk.Revit.DB.ICustomFieldProperties represents the base class for the properties of a custom field.

The method:

allows users to identify if two custom field properties are equal or not.

The new value in enum Autodesk.Revit.DB.CellType:

represents whether the data is bound to a Schedule Custom Field.

The new method:

allows users to get a custom field id from the specified cell.

2.22. External Service API addition

The new property in Autodesk.Revit.DB.ExternalService.ExternalServiceOptions and Autodesk.Revit.DB.ExternalService.ExternalService:

indicates if the service supports activation/deactivation of its servers.

2.23. View API additions

2.23.1. Revision Clouds in Sheets

The new method:

allows users to get the ids of the revision clouds which appear on the sheet's revision schedules.

2.24. Graphics API additions

2.24.1. Additional view graphics

We now provide the ability to add view graphics on top of existing element graphics, to elements which have model or view specific graphics.

The new class:

represents a collection of ExternallyTaggedNonBRep instances

The new methods:

The new enum:

represents the ways in which an ExternallyTaggedNonBRep can be used in Revit. It has the following values:

2.25. UI API additions

2.25.1. UIThemeManager

The new properties in Autodesk.Revit.UI.UIThemeManager

2.25.2. ThemeChangedEventArgs

The new class:

represents the event arguments used by the ThemeChanged event.

2.25.3. Selection

The new value for enum Autodesk.Revit.UI.Selection.ObjectSnapTypes

2.26. Mechanical API additions

The new property:

indicates whether to enable network-based calculations for duct networks.

2.27. Toposolid API additions

2.27.1. Toposolid and Toposolid Type

The new class:

represents a Toposolid within the Autodesk Revit project. This new topography element is a solid element that has an assigned type and basic parameters and is eligible for Boolean operations such as cutting with Mass and In-place component. In the API, the element is closely related with floors and the points are editable using the same SlabShapeEditor interfaces. In addition, if the element has a Sketch boundary it can be accessed via the standard SketchEditScope capabilities.

The Toposolid class offers the following new members:

The new class:

represents the type of a Toposolid in Autodesk Revit. This class inherits from HostObjAttributes and so provides read/write access to the CompoundStructure of the ToposolidType.

The ToposolidType class offers the following new members:

2.28. Import/Export API additions

The new method:

allows users to format an evaluated parameter as a string with custom format options. This provides a new overload to the previously added EvaluatedParameter.AsValueString(Document) to provide parity with Parameter.AsValueString() and Parameter.AsValueString(FormatOptions)

The new property:

represents the document's creation GUID from the document history.

2.29. Miscellaneous

2.29.1. SunStudyTimeInterval

The new values for enum Autodesk.Revit.DB.SunStudyTimeInterval allows user to use seconds for solar study time interval to run the simulation more precisely