< Rev API Docs

Major changes and renovations to the Revit API

API changes

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. 


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.


Deprecated member(s) Replacement member(s) Notes
Autodesk.Revit.DB.ElementId.IntegerValue  Autodesk.Revit.DB.ElementId.Value

IntegerValue will throw an exception if called on an ElementId whose value is high enough to need more than 32 bits to describe it. It is replaced by the new Value property that returns the full 64-bit value. 

Autodesk.Revit.DB.ElementId()

Autodesk.Revit.DB.ElementId(System::Int64 id) Replaced by a constructor that takes the full 64-bit Value.

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.

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.

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.

Changes to other APIs

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

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:

should be changed to


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:

Deprecated member(s) Replacement member(s) Notes
TopographySurface.Create() Toposolid.Create() (from points or curve profiles) Toposolid.CreateFromTopographySurface() is also available to convert an older element to its more modern replacement.

TopographySurface.AddPoints()

TopographySurface.DeletePoints()

TopographySurface.MovePoint()

TopographySurface.ChangePointElevation()

TopographySurface.ChangePointsElevation()

Toposolid.GetSlabShapeEditor()  Use the SlabShapeEditor to query, add, modify and delete individual points
SiteSubRegion.Create() Toposolid.CreateSubDivision()
SiteSubRegion.SetBoundary() Edit the sketch of the subdivision Toposolid element using SketchEditScope

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.


Family API changes

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.

FamilyManager

Deprecated member(s) Replacement member(s)

FamilyManager.AddParameter(ExternalDefinition, BuiltInParameterGroup, bool)

FamilyManager.AddParameter(ExternalDefinition, ForgeTypeId, bool)

FamilyManager.AddParameter(string, BuiltInParameterGroup, Category, bool)

FamilyManager.AddParameter(String, ForgeTypeId, Category, bool)
FamilyManager.ReplaceParameter(FamilyParameter, ExternalDefinition, BuiltInParameterGroup, bool) FamilyManager.ReplaceParameter(FamilyParameter, ExternalDefinition, ForgeTypeId, bool)
FamilyManager.ReplaceParameter(FamilyParameter, string, BuiltInParameterGroup, bool) FamilyManager.ReplaceParameter(FamilyParameter, ExternalDefinition, ForgeTypeId, bool)
FamilyManager.IsUserAssignableParameterGroup(BuiltInParameterGroup) FamilyManager.IsUserAssignableParameterGroup(ForgeTypeId)


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. 


Removal of Open ADSK workflow

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


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.


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:

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.


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.


Schedule API changes

Deprecated member Replacement member
ViewSchedule.ImageRowHeight ViewSchedule.RowHeight


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.

Deprecated member Replacement member
Autodesk.Revit.UI.UIThemeManager.DefaultTheme Autodesk.Revit.UI.UIThemeManager.CurrentTheme


Structure API changes

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


Fabrication API changes

Some flow-related parameters are renamed.

Original parameter name Renamed value Notes
RBS_PIPE_RELATIVE_ROUGHNESS_PARAM  RELATIVE_ROUGHNESS  Covers all design and fabrication elements.
RBS_PIPE_FRICTION_FACTOR_PARAM  FRICTION_FACTOR Covers all design and fabrication elements.
RBS_CURVETYPE_ROUGHNESS_PARAM  DUCT_ROUGHNESS  Covers design and fabrication ducts.
RBS_PIPE_ROUGHNESS_PARAM PIPE_ROUGHNESS  Covers design and fabrication pipes.


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.


Parameter API changes

Element.Parameters

The method Element.GetOrderedParameters() is compiled as the current description but the order of the parameters have 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.

Shared Parameters

Deprecated member Replacement member
LabelUtils.GetLabelFor(BuiltInParameterGroup) LabelUtils.GetLabelForGroup(ForgeTypeId)

Parameter Definition

Deprecated property Replacement member
Definition.ParameterGroup Definition.GetGroupTypeId()

Parameter Binding

Deprecated member Replacement member
BindingMap.Insert(Definition, Binding, BuiltInParameterGroup) BindingMap.Insert(Definition, Binding, ForgeTypeId)
BindingMap.ReInsert(Definition, Binding, BuiltInParameterGroup) BindingMap.ReInsert(Definition, Binding, ForgeTypeId)

Parameter Utils

Deprecated member Replacement member
ParameterUtils.GetParameterGroupTypeId(BuiltInParameterGroup) Please use members of the `GroupTypeId` class instead.
ParameterUtils.GetBuiltInParameterGroup(ForgeTypeId) Please use members of the `GroupTypeId` class instead.


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:

Classes

Methods

Properties

Enums


API Additions


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.


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:


Analysis API additions

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:

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.

Energy Analysis Opening

The new properties:

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

The new methods:

Energy Analysis Construction

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

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:


Structural Analytical Model API additions

Analytical to Physical Associations 

The following new methods in AnalyticalToPhysicalAssociationManager allows users to distinguish if its an analytical or a physical element. 

The following new methods in AnalyticalToPhysicalAssociationManager allows 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.

Structural Analytical Model Elements

The new method:

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


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.


DirectShape API additions

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

DirectShapeType

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

DirectShapeReferenceOptions

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

DirectShape

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


Detailing API additions

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.


Selection API additions

UI Application

The new class:

represents the event arguments used by the ThemeChanged event.

The new event:

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


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.


Reinforcement API additions

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:


Parameter API additions

The new methods in Element supports 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:


Slab API additions

The new enum:


Groups API additions

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:

Group Type

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


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:


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.


Parameter API additions 

ParameterDownloadOptions

The new class:

is an option class used for downloading parameters from the Parameters Service.

It has the following properties:

ParameterUtils 

The new methods:

Electrical Analytical API additions

ElectricalAnalyticalLoadSet

The new class:

It has the following methods:

It has the following properties:

AreaBasedLoadData

The new methods: 

PointLoadData

The new property:

ElectricalAnalyticalNode

The new method:

ElectricalLoadClassification

The new property


Structural API additions

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:

allows users to check if the IndependentTag has a tag behavior.

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.

LoadBase

The new methods:

LineLoad

Three new methods support custom line loads:

AreaLoad

Several new methods support custom area loads: 

PointLoad

Two new methods support custom point loads:

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 then loads are displayed according to force scale type parameters.

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: 


FilledRegion API additions

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


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:


Schedule API additions

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

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:

The new property:

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:

HostCount

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

Vertical Alignment of Schedules

The new enum:

represents the vertical alignment of data in a schedule.

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.


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.


View API additions

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.


Graphics API additions

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:


UI API additions

UIThemeManager

The new properties in Autodesk.Revit.UI.UIThemeManager

ThemeChangedEventArgs

The new class :

represents the event arguments used by the ThemeChanged event.

Selection

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


Mechanical API additions

The new property:

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


Toposolid API additions

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:


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.


Miscellaneous

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