The information below is based on the contents of the Revit Platform API Changes and Additions.docx document included with
the Revit 2025 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 2025 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 with table of contents and page numbers added:
The What's New section and the Changes and Additions document provide important information 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 keep at hand are:
The Revit API help file RevitAPI.chm
The Visual Studio solution containing all the SDK samples, Samples\SDKSamples.sln
You will regularly need both for research on how to solve specific Revit API programming tasks.
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.
In this version, Revit uses CEFsharp version v119.4.30
1.2. Revit now on .NET 8
The Revit API for Revit 2025 is built on .NET 8.
This upgrade keeps Revit up to date with the latest .NET features, performance improvements, and security fixes.
Addins for Revit 2025 will need to be rebuilt on .NET 8.
1.3. Add-ins and macro changes
1.3.1. MacroManager API
Updated Revit macro tool with modernized UI and code editor that also supports modern .NET API. Following methods were changed.
BRepBuilder now accepts HermiteSurface as a permitted support surface type for faces.
Changed behavior:
BRepBuilder.IsPermittedSurfaceType() will now return true for HermiteSurface.
BRepBuilderSurfaceGeometry.Create() can now accept a HermiteSurface and use it to create the corresponding BRepBuilderSurfaceGeometry.
1.6. Dimension API changes
After the introduction of LinearDimension class, when filtering for Dimensions, linear dimensions will return as type LinearDimension (child class) instead of Dimension (parent class).
Methods affected:
typeof(), etc. : If using typeof() or .getType().Equals(), to check if a LinearDimension is Dimension, it will not work due to the nature of the derived classes.
1.7. Extensible Storage(Schema) API changes
Fixed two API(s) for the Extensible Storage feature:
Document.EraseSchemaAndAllEntities() – Fixed the API to ensure it removes entities from all parts of a Revit model.
ExtensibleStorageFilter() – Fixed the API to ensure it filters all elements associated with extensible storage data based on specific Schema IDs.
1.8. Electrical API changes
1.8.1. Distribution system
The following properties were modified to support high-leg delta and single-phase distribution system.
AnalyticalDistributionNodePropertyData.NumberOfPhases → AnalyticalDistributionNodePropertyData.AssignedPhasesNumber – For analytical power source, bus, transformer, transfer switch, the number of electrical phases is read only in Revit 2025 and assigned through the distribution system. For analytical equipment load, we suggest you use the AnalyticalEquipmentLoadData.PhasesNumber property.
Revit.DB.View.SetLinkOverrides(ElementId, RevitLinkGraphicsSettings) – Supports RevitLinkGraphicsSettings of Custom type.
Revit.DB.View.GetLinkOverrides(ElementId) – Removed two validators:
AreGraphicsOverridesAllowed()
IsLinkOverridesSupported()
1.10. MEP changes
1.10.1. Duct Settings
Two new properties DuctSettings.AirDynamicViscosity and DuctPressureDropData.DynamicViscosity were added to clarify the value used in the duct pressure loss calculation. They replaced the deprecated properties that were kinematic viscosity.
RebarConstraintsManager.SetPreferredConstraintForHandle(RebarConstrainedHandle handle, RebarConstraint constraint) → RebarConstraintsManager.SetPreferredConstraint(RebarConstraint constraint) – Use the new replacement method to set RebarConstraint as preferred constraint target that avoids issues where one could apply the RebarConstraint bounded to handle 'A' to another handle 'B'.
RebarConstraintsManager.GetConstraintCandidatesForHandle(RebarConstrainedHandle handle)
→ RebarConstraintsManager.GetConstraintCandidatesForHandle(Structure.RebarConstrainedHandle, ElementId) and
RebarConstraintsManager.GetConstraintCandidatesForHandle(Structure.RebarConstrainedHandle, Reference)
– For getting the direct neighbors of a rebar host, use Structure.RebarHostData.GetRebarHostDirectNeighbors(Element hostElement);
for getting all the rebars in a host, use Structure.RebarHostData.GetRebarsInHost()
Rebar.DistributionType;
the enum values
Uniform0 representing uniform distribution and
VaryingLength1 representing varying length distribution
→ RebarShapeDrivenAccessor.UseRebarConstraintsToProduceVaryingBars
1.12. Slab API changes
The following methods were added for adding split line on SlabShapeEditor.
Support added so that FooterText property can contain a hyperlink of the form "rvthelptopic:[topic]" to launch Revit's contextual for the topic specified. Previously, the only option was to specify "#" as the hyperlink and set the Dialog Id, making it difficult to share dialogs with same Id, but different context and associated Help.
1.15. Toposolid API changes
The following parameters were renamed without any changes to their functionality.
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:
Autodesk.Revit.DB.Mechanical.OccupancyUnit – Removed enum value OccupancyUnit.UseDefaultValues
Autodesk.Revit.DB.BaseLoadOn – Removed enum value BaseLoadOn.kUseDefaultLoad
2. API Additions
2.1. Add-ins and macros additions
2.1.1. MacroManager API
The new property:
MacroModule.ModuleFolder – Returns the folder of the module.
The new interface:
IModuleMaker
allows users to create new module project by implementing this interface.
The new event:
MacroUpdated
is raised after the macro modules are updated.
2.2. Analysis API additions
2.2.1. MEP Analytical networks
The new constructor allows users to traverse both sides of the specified analytical segment. In comparison, the existing constructor MEPNetworkIterator(Document, MEPAnalyticalNode, MEPAnalyticalSegment) only traverses one side of the analytical segment.
Users now have access to Duct/Pipe pressure loss characteristic allowing them to correlate the element and understand the calculation logic.
The new classes:
Autodesk.Revit.DB.Analysis.CriticalPathCollector – Provides the calculated flow and pressure drop values of the network critical path, so users can better select their equipment.
Autodesk.Revit.DB.Analysis.CriticalPathIterator – Allows users to traverse the analytical segments on the network critical path.
2.2.3. MEP Space Engineering Parameters
Users now have access to building operating day and year schedules allowing them to create and edit schedules that describe the usage of buildings (occupancy, power, lighting) for use in energy analysis.
The new classes:
Autodesk.Revit.DB.Analysis.BuildingOperatingDaySchedule – An element that represents the 24 hour operating schedule.
Autodesk.Revit.DB.Analysis.BuildingOperatingYearSchedule – An element that represents the 365 day operating schedule.
The new methods:
BuildingOperatingDaySchedule.Create(Document, Name) – Allows creation of a new BuildingOperatingDaySchedule with that name and adds it to the document. It returns the newly created BuildingOperatingDaySchedule element, with all usages set to 0.
BuildingOperatingYearSchedule.Create(Document, DaySchedule, Name) – Allows creation of a new BuildingOperatingYearSchedule with that name and adds it to the document. It returns the newly created BuildingOperatingDaySchedule element, with all usages set to daySchedule.
Exposing the new class to fix different behavior of span direction symbol between UI and API.
The new class:
Autodesk.Revit.DB.SpanDirectionSymbol
represents an instance of a Span Direction Symbol in Autodesk Revit.
2.4. Array API additions
2.4.1. Linear Array
The new methods:
LinearArray.GetMinimumSize() – Allows users to get the minimum size of a linear array based on if the document is a family document.
LinearArray.GetNumberOfMembersIncludingPlaceholders() – Allows users to get the number of members in a linear array, including placeholders that are still there in families with small array counts.
LinearArray.IsValidNumberOfMembers() – Indicates whether the input count is a valid size for an array based on the document.
2.5. MEP Fabrication API additions
The new methods in the FabricationConfiguration class now provides support to check for bad connections between fabrication parts prior to reloading the configuration.
CheckConnectionsForAllFabricationParts() – Allows users to check the connections for all fabrication parts in the current project. It will create reviewable warnings for all bad connections found.
ValidateConnectionsForAllFabricationParts() – Allows users to validate all fabrication part connections in the current project. Invalid connections found will be added to the connection validation information class. The validation checks for bad alignments or gaps, incompatible connection types, mismatches of size, mismatches of shapes.
PostReviewableWarningsForBadConnections() – Reviewable warnings are created for all entries contained in the connection validation information.
GetUpdatedStraightsFromValidateConnections() – Allows users to get the set of element identifiers of fabrication part straights that were previously updated. If no straights were updated, it will return an empty set of element identifiers.
2.6. DirectShape API additions
The new method:
DirectShapeType.SetShape(IList<GeometryObject>, DirectShapeTargetViewType) – Allows users to set a custom plan view representation of a DirectShapeType.
2.7. Dimension API additions
Users can now create radial, linear and arc length dimensions via the API in a project document.
Added functionality for high-leg delta and single-phase distribution system. User can now create and modify high-leg delta distribution system and single-phase load in electrical analytical distribution system, and get the per phase current on each node.
The new classes:
Autodesk.Revit.DB.Electrical.ElectricalPerPhaseData – Represents per phase values including current and load.
Autodesk.Revit.DB.Electrical.AnalyticalPowerDistributableNodeData – Represents the data and parameters of a power distributable node.
Autodesk.Revit.DB.Electrical.AnalyticalTransformerData – Represents the data and parameters of analytical transformer node.
The new properties:
Electrical.DistributionSysType.HighLegPhase – Represents the high-leg phase in the 3 phase 4 wires delta distribution system.
AnalyticalPowerSourceData.ApparentPowerRating – Represents the apparent power rating value of the analytical power source.
AnalyticalDistributionNodePropertyData.ConnectedPhases – Represents the electrical connected phases of the electrical analytical node to its upstream node.
AnalyticalEquipmentLoadData.PhasesNumber – Represents the number of electrical phases of the analytical equipment load.
AnalyticalEquipmentLoadData.PowerFactorState – Represents the PowerFactorState type of the analytical equipment load.
AreaBasedLoadData.ConnectedPhases – Represents the electrical connected phases of the area based load to its upstream node.
AreaBasedLoadData.PhasesNumber – Allows users to set the number of electrical phases of the area based load.
AreaBasedLoadData.PowerFactorState – Represents the power factor state of the area based load.
AreaBasedLoadType.PowerFactorState – Represents the power factor state of the area based load type.
The new enums:
Autodesk.Revit.DB.Electrical.ElectricalPhaseLine – Defines the electrical phase.
Autodesk.Revit.DB.Electrical.ElectricalConnectedPhases – Defines the electrical connected phases of an electrical analytical node.
2.9. Energy Analysis API additions
2.9.1. gbXML export options
We now provide support for legacy export of gbXML based on a conceptual energy analytical model from a conceptual mass model from add-ins/add-ons.
The new methods:
GetMassIds() – Allows users to get a list of masses to use as shading surfaces in the exported gbXML.
GetMassZoneIds() – Allows users to get a list of mass zones to analyze in the exported gbXML.
The new constructor:
GBXMLExportOptions(massZoneIds, massIds) – Allows users to construct a new instance of the options used to export a mass model to gbXML.
The new property:
IsConceptual – Indicates if the exported gbXML is based on a conceptual energy analytical model from a conceptual mass model.
2.10. IFC API additions
2.10.1. IFC Hybrid Import
IFCHybridImport.UpdateElements() – The new method allows users to update elements previously imported via a Hybrid IFC Link operation.
IFCHybridImport.GetIFCStepIdToElementIdMap() – The new method allows users to retrieve the association between the original IFC STEP identifiers and the created or updated Elements.
2.10.2. IFC Category Mapping
Added functionality that allows user to control the way how Revit categories are mapped to IFC Classes during IFC Export. User can now create, retrieve and modify IFC category mapping templates.
The new classes:
Autodesk.Revit.DB.IFCCategoryTemplate – Represents an element that contains IFC category mapping template stored in a Revit document.
Autodesk.Revit.DB.ExportIFCCategoryKey – Represents a Revit category item stored in a template.
Autodesk.Revit.DB.ExportIFCCategoryInfo – Represents the mapped IFC information stored in the template.
The new enum:
CustomSubCategoryId – Represents pseudo sub-categories that can appear in a mapping template
has the following values:
None – Represents the default value for most Revit categories and subcategories.
InteriorWall – Represents the custom id for interior walls.
ExteriorWall – Represents the custom id for exterior walls.
FoundationWall – Represents the custom id for foundation walls.
RetainingWall – Represents the custom id for retaining walls.
Coreshaft – Represents the custom id for cores/shafts.
Soffit – Represents the custom id for soffits.
2.11. Import Export API additions
The new functionality provides support for importing, linking and exporting files of STEP format.
The new class:
STEPImportOptions
represents the options for STEP formats.
The new methods, uses the new class STEPImportOptions:
Document export for PDF now allows using a separate Revit Worker to create the PDF in the background, leaving the main Revit process free for other work. FileExporting and FileExported events are triggered at the start and end of the export job respectively. There are new API calls for PDFExportOptions, FileExportedEventArgs, and FileExportingEventArgs. Third party Addins may interfere with the PDF generation using this feature if they change the appearance of Elements in a way that is not serialized.
The new method:
PDFExportOptions.SetExportInBackground() – When set to true, Document.Export launches a new process to export the PDF that leaves Revit unblocked. Changes to the document made after the export has started are not accounted for in the PDF.
The classes FileExportingEventArgs and FileExportedEventArgsBoth have a new member:
BackgroundOperation – The value is true if a background process was requested for the background operation that raised the event.
2.13. Reinforcement API additions
2.13.1. Rebar
Users now have the ability to create and modify rebar constraints to surfaces.
The new enum:
RebarConstraintsStatus
represents the status of the constraints.
The new value for RebarConstraintType enum:
ToSurface
represents handle is constrained to a surface.
The new methods:
RebarConstraint.CreateConstraintToSurface() – Allows users to create a constraint of ToSurface type for a given RebarConstrainedHandle.
RebarConstraint.GetSurfaceForConstraintToSurface() – Allows users to retrieve the surface for a constraint of ToSurface type.
RebarConstraint.IsValidSurfaceToConstraintHandleTo() – Allows users to check if the surface can be used to create a constraint to it for a given RebarConstrainedhandle.
RebarConstraint.IsToSurface() – Returns true if the RebarConstraintType of the RebarConstraint is ToSurface, false otherwise.
RebarConstraint.GetRebarConstrainedHandle() – Allows users to get the RebarConstrainedHandle for which this constraint is.
RebarConstraint.FlipSideForClearBarSpacingZeroDistanceConstraint() – This method in RebarConstriant is applied for bar-on-bar constraint. It flips the side on which a RebarConstrainedHandle constrained using clear bar distance with zero offset connects to another Rebar target handle.
RebarConstrainedHandle.IsEqual() – Returns true if the objects are equal, false otherwise.
RebarConstraintsManager.SetPreferredConstraintsToSurfaceForHandles() – For ShapeDriven rebar it will set a preferred 'ToSurface' RebarConstraint for each input handle. The surface that will be used by the constraint is the current surface that is used to compute the position of the handle. This function applies only for shape driven Rebar, and will throw exception for free form rebar.
RebarConstraintsManager.SetPreferredConstraint() – Allows users to set the RebarConstraint as preferred constraint for its RebarConstrainedHandle.
RebarConstraintsManager.GetAutomaticConstraintCandidatesForHandle() – For shape driven rebar returns all possible automatic RebarConstraints that could be used for a specified RebarConstrainedHandle. For free form rebar it returns an empty list.
2.13.2. Rebar splice type options and rules
Added functionality for splicing the rebar. Users can now splice a rebar, remove the splice (keeping the bars separated), unify into one bar, modify the data related to splice and modify the constraints of the spliced bars seeing as splice chain.
The new classes:
Autodesk.Revit.DB.Structure.RebarSpliceTypeUtils – Utility class for dealing with rebar splice type operations.
Autodesk.Revit.DB.Structure.RebarSpliceOptions
Autodesk.Revit.DB.Structure.RebarSpliceGeometry – This class consists of a vector and a point which will be projected to the nearest rebar curve.
Autodesk.Revit.DB.Structure.RebarSpliceRules
Autodesk.Revit.DB.Structure.RebarSplice – A class that can used to access the data between two connected rebars.
RebarHostData.GetRebarHostDirectNeighbors() – Returns the first level of neighbors for the provided host that can host reinforcement, i.e. elements that are joined directly to the provided host element and not the neighbors of the joined elements.
RebarSplicePosition – Describes the position of the splice. It has the following values:
End1 – Lap is towards the start of the splice chain.
Middle – Lap goes into both directions.
End2 – Lap is towards the end of the splice chain.
RebarSpliceShiftOption – Describes the way bars are shifted in the splice relation. It has the following values:
BarPlane – Represents the bar plane is shifted so that the spliced rebars are not clashing.
None – The bars are not shifted at all.
RebarSpliceByRulesRunOutPosition – Describes the run-out position. It has the following values:
Start – Represents the rest will remain at the start of the bar.
End – Represents the rest will remain at the end of the bar
RebarSpliceError – Represents the states for splicing a Rebar. It has the following values:
Success
Unknown – Represents there is an unexpected error.
InvalidRebar – Represents free form rebars or shape driven rebars that are multiplanar or having shape whose definition is RebarShapeDefinitionByArc or rebars part of a group that cannot be spliced.
InvalidLineOrLinePlaneNormal – Represents the line length is zero or the line direction is parallel with the line plane normal.
LineDoesNotIntersectRebarBoundingBox – Represents the line doesn't intersect the rebar bounding box.
SpliceGeometryOnHookOrFillet – Represents if the splice geometry is on a hook or a fillet, the rebar can't be spliced with it.
TooSmallSegments – Represents one of the resulting segments is too small to apply the lap.
SpliceGeometryDoesNotIntersectAllTheBarsInTheSet – Represents a plane obtained from splice geometry doesn't intersect all the bars in the set.
SpliceGeometryAlmostParallelToBarSegment – Represents the plane formed by splice geometry is almost parallel to bar segment plane.
RebarSpliceByRulesError – Represents the states for splicing a Rebar by rules. It has the following values:
Success
Unknown – Represents there is an unexpected error.
InvalidRebar – Represents free form rebars or shape driven rebars that are multiplanar or having shape whose definition is RebarShapeDefinitionByArc or rebars part of a group that cannot be spliced.
TooBigHook – Represents the hook lengths exceed the maximum length.
TooSmallRunOut – Represents the run-out is below minimum length, or the lap can't be applied to it.
MaximumLengthBiggerThanBarLength – Represents the maximum length exceeds the bar length.
TooBigArc – Represents the arc segment exceeds the maximum length.
CantSpliceAllTheBarsInSet – Represents some bars in the varying set are not intersected by the resulting splice geometries.
LapLengthBiggerThanMaximumBarLength – Represents the lap length is greater than the maximum length.
InvalidCombinationOfMaximumMinimumBarLengthAndLapLength – Represents the combination of the maximum bar length, minimum bar length and lap length is invalid.
RebarHandleBehavior – Represents different behaviors that can be applied to a RebarConstrainedHandle. It has the following values:
Default – Represents the default behavior of a RebarConstrainedHandle.
SpliceMainEndOnEnd1Position
SpliceMainEndOnMiddlePosition – Represents the behavior can be set to a StartOfBar or EndOfBar RebarConstrainedHandle of a bar that is part of splice. On the connected bar there is a ToOtherRebar constraint whose target is the current rebar. The RebarConstrainedHandle's plane in the same position as the splice plane for Middle.
SpliceMainEndOnEnd2Position – Represents the behavior can be set to a StartOfBar or EndOfBar RebarConstrainedHandle of a bar that is part of splice. On the connected bar there is a ToOtherRebar constraint whose target is the current rebar. The RebarConstrainedHandle's plane in the same position as the splice plane for Middle
SpliceConnectedEndOnEnd1Position – Represents the behavior can be set to a StartOfBar or EndOfBar RebarConstrainedHandle of a bar that is part of splice. On this RebarConstrainedHandle is a ToOtherRebar constraint whose target is the other bar involved in splice. The RebarConstrainedHandle's plane in the same position as the splice plane for End1.
SpliceConnectedEndOnMiddlePosition – Represents the behavior can be set to a StartOfBar or EndOfBar RebarConstrainedHandle of a bar that is part of splice. On this RebarConstrainedHandle is a ToOtherRebar constraint whose target is the other bar involved in splice. The RebarConstrainedHandle's plane in the same position as the splice plane for Middle
SpliceConnectedEndOnEnd2Position – Represents the behavior can be set to a StartOfBar or EndOfBar RebarConstrainedHandle of a bar that is part of splice. On this RebarConstrainedHandle is a ToOtherRebar constraint whose target is the other bar involved in splice. RebarConstrainedHandle's plane in the same position as the splice plane for End2
SpliceRebarPlaneOnSpliceSetExtent – Represents the behavior can be set to a RebarPlane RebarConstrainedHandle of a bar that is part of splice
SpliceOutOfPlaneExtentOnSpliceSetExtent – Represents the behavior can be set to a OutOfPlaneExtent RebarConstrainedHandle of a bar that is part of splice.
SpliceEdge – Represents the behavior can be set to an edge segment that is connected to the other rebar of splice.
2.14. Selection API additions
2.14.1. UI Application
The new enum:
ThemeType – Represents the application frame theme type. It has the following values:
CanvasTheme – Indicates that the ThemeChanged event is triggered by canvas theme change.
UITheme – Indicates that the ThemeChanged event is triggered by the global UI theme change.
The new read-only property for ThemeChangedEventArgs:
ThemeChangedType – Returns ThemeType enum that indicates the kind of change triggered the current event.
2.15. Sketched Element API additions
2.15.1. Wall APIs
The new methods now allow users to selectively enable or disable end wrapping for a specific wall end when the wall's end wrap is activated in the Wall Type dialog.
Revit.DB.Wall.GetWrappingLocationAsReferences(int locationIndex) – Allows users to get an array of references to faces at the location.
Revit.DB.Wall.GetWrappingLocationAsCurveParameter(int locationIndex) – Allows users to get the non-normalized (actual) curve parameter of the location.
AnalyticalElement.IsValidTransform() – Allows users to check whether the value set for Local Coordinate System is valid for an Analytical Element.
AnalyticalElement.SetTransform() – Allows users to set the transform of Analytical Element Local Coordinate System.
2.16.2. Analytical Surface
The new method:
AnalyticalSurfaceBase.IsOuterContourValid() – Allows users to verify if contour is valid for this Analytical Surface.
2.16.3. Bending Details on Drawings
Added new functionality for enhancing bending details. These include the ability to create and customize the size of schematic bending detail boxes, set specific tag types for bending details, adjust the position and rotation of tags relative to the bending detail, customize the tag alignment option, and add multiple hosts for the schematic bending detail. This update offers greater flexibility and precision in the representation and annotation of bending details in Revit models.
The new methods:
RebarBendingDetail.AddHosts()
RebarBendingDetail.GetHosts()
RebarBendingDetail.RemoveHosts()
RebarBendingDetail.SetTagRelativePosition()
RebarBendingDetail.SetTagRelativeRotation()
RebarBendingDetail.GetTagRelativePosition()
RebarBendingDetail.GetTagRelativeRotation()
RebarBendingDetail.IsSchematicBendingDetail()
RebarBendingDetail.IsRealisticBendingDetail()
RebarBendingDetail.ResetTagRelativePosition()
RebarBendingDetail.ResetAnnotationPositions()
The new properties:
RebarBendingDetailType.SchematicHeight – Represents the height of the box where the schematic Bending Detail will be represented.
RebarBendingDetailType.SchematicWidth – Represents the width of the box where the schematic Bending Detail will be represented.
RebarBendingDetailType.TagTypeId – Represents the Id of the tag type which is used in the Bending Detail representation.
RebarBendingDetailType.DisplayMode – Represents the display mode for the bending detail.
represents the mode in which the Bending Detail will be represented.
2.16.4. Radial Array
The new methods:
RadialArray.GetMinimumSize() – Allows users to get the minimum size of a radial array based on if the document is a family document.
RadialArray.GetNumberOfMembersIncludingPlaceholders() – Allows users to get the number of members in a radial array, including placeholders that are still there in families with small array counts.
RadialArray.IsValidNumberOfMembers() – Indicates whether the input count is a valid size for an array based on the document.
2.17. Tag/Keynotes API additions
We now provide functionality to align multiple text, tags and keynotes with new contextual alignment tools in the ribbon.
allows users to align annotation elements to one another. Currently supports TextNotes, Tags and Keynotes.
The new methods:
AnnotationMultipleAlignmentUtils.ElementSupportsMultiAlign() – allows users to check whether the element type can be aligned using the multiple allignment commands.
AnnotationMultipleAlignmentUtils.GetAnnotationOutlineWithoutLeaders() – allows users to get the four corners of the annotations bounding box, not including leaders. Outline calculations include leader/border offsets wherever applicable. (Eg. in the case of TextNotes).
AnnotationMultipleAlignmentUtils.MoveWithAnchoredLeaders() – allows users to move the given element to the position specified by the input moveVec, while keeping the leader end points anchored.
2.18. Toposolid API additions
Added functionality for Toposolid smooth shading.
The new methods:
Toposolid.ExcavateBy() – Allows users to excavate toposolid by a given element.
Toposolid.RemoveExcavationBy() – Allows users to remove the excavation between the given element and the toposolid.
Toposolid.CanBeExcavatedBy() – Allows users to check if the given element can be used to excavate the toposolid.
Toposolid.SetSmoothedSurface() – Allows users to set the smoothed surface setting of toposolid category in the given document.
Toposolid.IsSmoothedSurfaceEnabled() – Allows users to check if smoothed surface setting of toposolid category is enabled in the given document.
Toposolid.GetIntersectingElementData()
ToposolidType.SetContourSetting() – Allows users to set the contour setting for the current toposolid type by copying from an existing contour setting object.
ContourSetting.IsItemEnabled()
ContourSettingItem.GetContourSettingItemType()
FaceToposolid.Create()
FaceToposolid.UpdateToFace() – Allows users to reset the face toposolid to its defining face.
FaceToposolid.GetReferencedFaces()
FaceToposolid.SetReferencedFaces()
The new classes:
Autodesk.Revit.DB.IntersectingElementData – Stores information of an element that intersects with another element.
Autodesk.Revit.DB.FaceToposolid – represents a face-based Toposolid within the Autodesk Revit project.
The new enum:
Autodesk.Revit.DB.IntersectionType – It has the following values.
Cut
Excavate
Autodesk.Revit.DB.ContourSettingItemType – Represents the type of contour setting item. It has the following values:
Single
UnboudedRange
BoundedRange.
The new properties:
IntersectingElementData.IntersectionType
IntersectingElementData.IntersectingElementId
IntersectingElementData.IntersectedElementId
IntersectingElementData.IntersectionVolume
2.19. UI API additions
2.19.1. Context Menu
We now provide functionality to create context menu from an add-in.
The new Interface:
Revit.UI.IContextMenuCreator – The interface users need to implement to build context menu.
The new Constructor:
Revit.UI.ContextMenu() – Allows users to create a new instance of Context Menu.
Revit.UI.CommandMenuItem(name , className, assemblyName ) – Allows users to create a new instance of command menu item with name, external command class name and external application assembly name.
Revit.UI.SubMenuItem(name , ContextMenu) – Allows users to create a new instance of flyout menu with name and sub menu instance.
Revit.UI.Separator() – Allows users to create a new instance of separator menu item.
The new methods:
ContextMenu.AddItem() – Allows users to add a specific type of MenuItem object to context menu.
CommandMenuItem.SetAvailabilityClassName() – Allows users to set availabilityClassName of CommandMenuItem.
CommandMenuItem.SetToolTip() – Allows users to set tooltip of CommandMenuItem.
IContextMenuCreator.BuildContextMenu() – Allows users to add menu items to the passed in ContextMenu object.
UIControlledApplication.RegisterContextMenu() – Allow user to add new context menu creators with application name.
2.20. View API additions
2.20.1. SheetCollection
The new class:
Autodesk.Revit.DB.SheetCollection – Represents a sheet collection in Autodesk Revit.
The new methods:
Autodesk.Revit.DB.SheetCollection.Create(document, name) – Allows users to create a new instance of sheet collection with a specified name and adds it to the document. It returns the newly created sheet collection element.
Autodesk.Revit.DB.SheetCollection.Create(document) – Allows users to create a new instance of sheet collection with an auto-generated name and adds it to the document. It returns the newly created sheet collection element.
The new property:
Autodesk.Revit.DB.ViewSheet.SheetCollectionId – Represents the Id of the sheet collection this sheet is associated with.
2.21. Link Visibility/Graphic Override API additions
The new functionality allows Revit Link Visibility/Graphic Overrides, for the 'Custom' option.
The new methods in class Autodesk.Revit.DB.RevitLinkGraphicsSettings:
RevitLinkGraphicsSettings.IsViewRangeSupported(View) – Allows users to check if the input view supports view range settings for RevitLinkGraphicsSettings graphic overrides.
RevitLinkGraphicsSettings.GetPhaseId()
RevitLinkGraphicsSettings.GetPhaseType()
RevitLinkGraphicsSettings.SetPhase(LinkVisibility, ElementId) – Allows users to configure phase and phase type of RevitLinkGraphicsSettings. Accepts LinkVisibility and ElementId of the phase from the linked document or ElementId.InvalidElementId.
RevitLinkGraphicsSettings.GetPhaseFilterId()
RevitLinkGraphicsSettings.GetPhaseFilterType()
RevitLinkGraphicsSettings.SetPhaseFilter(LinkVisibility, ElementId) – Allows users to configure phase filter and phase filter type of RevitLinkGraphicsSettings. Accepts LinkVisibility and ElementId of the phase filter from the linked document or ElementId.InvalidElementId.
RevitLinkGraphicsSettings.SetViewDetailLevel(LinkVisibility, ViewDetailLevel) – Allows users to configure detail level and detail level type of RevitLinkGraphicsSettings. Accepts LinkVisibility and ViewDetailLevel types.
RevitLinkGraphicsSettings.GetDiscipline()
RevitLinkGraphicsSettings.GetDisciplineType()
RevitLinkGraphicsSettings.SetDiscipline(LinkVisibility, ViewDiscipline) – Allows users to configure discipline and discipline type of RevitLinkGraphicsSettings. Accepts LinkVisibility and ViewDiscipline types.
The new properties in Autodesk.Revit.DB.RevitLinkGraphicsSettings:
RevitLinkGraphicsSettings.ViewFilterType
RevitLinkGraphicsSettings.ViewRange
RevitLinkGraphicsSettings.ColorFill
RevitLinkGraphicsSettings.ObjectStyles
RevitLinkGraphicsSettings.NestedLinks
2.22. RevitServer Enterprise / Revit Cloud Worksharing API additions
The following events have been supported for file-based worksharing since 2021. We now support them in RevitServer Enterprise/Revit Cloud Worksharing.
DocumentReloadingLatest – Subscribe to the DocumentReloadingLatestEventArgs event to be notified when Revit is just about to reload latest changes from a central model.
DocumentReloadedLatest – Subscribe to the DocumentReloadedLatestEventArgs event to be notified immediately after Revit has finished reloading a document with central model.