Revit Platform Api Changes and Additions 2024 01
Revit Platform Api Changes and Additions 2024 01
1. API CHANGES 4
2. API ADDITIONS 12
2.29. Miscellaneous 31
2.29.1. SunStudyTimeInterval 31
This resulted in changes to the ElementId class and members and some other tools.
• Autodesk.Revit.DB.ElementId.Value
• Autodesk.Revit.DB.ElementId(System.Int64 id)
allows users to create an ElementId handle with the given Int64 id.
• This requires little to no code changes, however, code built against pre-2024 versions of the API
may experience type cast and other type related exceptions when run against the 2024 versions
of the API when working with the enum.
• In order to run successfully, code needs to be rebuilt against the Revit 2024 API.
• This requires little to no code changes, however, code built against pre-2024 versions of the API
may experience type cast and other type related exceptions when run against the 2024 versions
of the API when working with the enum.
• In order to run successfully, code needs to be rebuilt against the Revit 2024 API.
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:
TopographySurface.DeletePoints()
TopographySurface.ChangePointsEle
vation()
Toposolid.CreateSubDivisi
SiteSubRegion.Create()
on()
Edit the sketch of the
subdivision Toposolid
SiteSubRegion.SetBoundary()
element using
SketchEditScope
• Autodesk.Revit.DB.SSEPointVisibilitySettings
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.
• Autodesk.Revit.Creation.Document.NewFamilyInstance()
• Autodesk.Revit.Creation.FamilyItemFactory.NewFamilyInstance()
1.4.2. FamilyManager
• FamilyInstance.Room()
• FamilyInstance.Room(Phase)
• FamilyInstance.FromRoom
• FamilyInstance.FromRoom(Phase)
• FamilyInstance.ToRoom
• Application.OpenBuildingComponentDocument()
• ATFExportOptions
was renamed to BIMExportOptions to better reflect the purpose that it serves in the export options
hierarchy. No functionality was changed.
The method:
can now be used to copy sketch members from a sketch to the main document.
• Copying within one Sketch - If there is an active sketch edit mode, you can now copy sketch
members of the active sketch. The copied elements will be added to the active sketch.
• Copying between Sketches - Allows you to copy sketch members from one sketch to another. To
do this, sketches must be parallel and the destination sketch must be in edit mode.
• Copying ModelCurves from the Document to a Sketch - Allows you to copy ModelCurves from the
document to a sketch, if the sketch is in edit mode. To do this, the sketch plane must be parallel
to the WorkPlane that ModelCurves are based on.
• ElementTransformUtils.CopyElements()
• ElementTransformUtils.MirrorElements()
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.
• Autodesk.Revit.DB.Analysis.MassLevelData
was mistakenly marked for deprecation in Revit 2023, but the class is still applicable, so it is now no
longer marked for deprecation.
• AreaLoad.SetLoops()
• LineLoad.SetPoints()
• PointLoad.Point { set; }
• DirectShape.AddReferencePlane()
• DirectShape.AddReferencePoint()
• DirectShape.AddReferenceCurve()
• DirectShapeType.AddReferencePlane()
• DirectShapeType.AddReferencePoint()
• DirectShapeType.AddReferenceCurve()
1.16.1. Classes
• Analysis.MassGBXMLExportOptions
• Analysis.MassZone
• Analysis.MassEnergyAnalyticalModel
1.16.2. Methods
1.16.3. Properties
• EnergyAnalysisSpace.AnalyticalVolume
• EnergyAnalysisSpace.InnerVolume
• GeometryInstance.Symbol
1.16.4. Enums
• STLExportResolution
• Analysis.AnalysisMode.ConceptualMasses
2. API Additions
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.
• EnergyAnalysisSurface.OriginatingElementId
• EnergyAnalysisSurface.OriginatingElementName
• EnergyAnalysisSurface.GetConstruction()
allows users to get the analytic construction this surface is associated with.
• EnergyAnalysisOpening.OriginatingElementId
• EnergyAnalysisOpening.OriginatingElementName
• EnergyAnalysisConstruction.IsSchematic
2.3.5. EnergyDataSettings
The new property:
• Autodesk.Revit.DB.Analysis.EnergyDataSettings.UseCurrentViewOnly
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.
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.
• Autodesk.Revit.DB.Analysis.MEPAnalyticalModelData
• Autodesk.Revit.DB.Analysis.MEPAnalyticalSegment
• Autodesk.Revit.DB.Analysis.MEPAnalyticalNode
• Autodesk.Revit.DB.Analysis.MEPNetworkSegmentId
• Autodesk.Revit.DB.Analysis.MEPNetworkSegmentData
• Autodesk.Revit.DB.Analysis.MEPNetworkIterator
• Autodesk.Revit.DB.Structure.AnalyticalToPhysicalAssociationManager.IsAnalyticalElement()
• Autodesk.Revit.DB.Structure.AnalyticalToPhysicalAssociationManager.IsPhysicalElement()
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.
• Autodesk.Revit.DB.Structure.AnalyticalToPhysicalAssociationManager.AddAssociation()
• Autodesk.Revit.DB.Structure.AnalyticalToPhysicalAssociationManager.GetAssociatedElementIds
()
• Autodesk.Revit.DB.Structure.AnalyticalToPhysicalAssociationManager.EnableAssistedAssociatio
n
allows users to indicate if associations between Analytical and Physical Elements should be created
automatically.
creates and returns new AnalyticalPanel from a curve and an extrusion direction.
• Autodesk.Revit.DB.BackClippingParam
• DirectShapeType.Has/GetExternallyTaggedReference()
• DirectShapeType.RemoveReferenceObject(Autodesk.Revit.DB.ExternalGeometryId
externalGeometryId) - Allows users to remove any reference object associated with the provided
ExternalGeometryId from the DirectShapeType. Nothing is done if no reference object has the
given external ID or if the external ID is an empty string. Note: This overloads the existing method
Autodesk.Revit.DB.DirectShapeType.RemoveReferenceObject(string) to remove a reference by
name. (Names are non-unique).
• DirectShapeType.IsValidUsage()
2.6.2. DirectShapeReferenceOptions
Three new methods have been added to Autodesk.Revit.DB.DirectShapeReferenceOptions:
• DirectShapeReferenceOptions.GetExternalGeometryId()
• DirectShapeReferenceOptions.SetExternalGeometryId()
• DirectShapeReferenceOptions.IsValidExternalGeometryId()
2.6.3. DirectShape
Similar to DirectShapeType, Autodesk.Revit.DB.DirectShape has the following new methods:
• DirectShape.Has/GetExternallyTaggedReference()
• DirectShape.RemoveReferenceObject()
• DirectShape.IsValidUsage()
• DetailElementOrderUtils.GetDrawOrderForDetails(DBView, ICollection<ElementId>)
allows you to understand the sorting of the given element ids by their detail draw order in the provided
view.
• Autodesk.Revit.UI.UIApplication.ThemeChanged
subscribe to the new new event ThemeChanged to be notified after the theme was changed. This event
is raised after the theme was changed.
• Autodesk.Revit.DB.Mesh.ComputeSurfaceArea()
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.
• RebarFreeFormAccessor.CycleCounter()
• RebarUpdateCurvesData.CycleCounterChanged()
• RebarUpdateCurvesData.GetCycleCounter()
• RebarUpdateCurvesData.SetCycleCounter()
Added the ability to set different orientation methods for an Aligned Free Form Rebar.
• RebarFreeFormAccessor.hasValidAlignedServer()
• RebarFreeFormAccessor.AlignedFreeFormSetOrientationOptions()
• RebarFreeFormAccessor.AlignedFreeFormSetOrientationOptions – The enum has the following
values
o AlignedToDistributionPath
o ParallelToFace
o PerpendicularToFace
Added the ability to identify the direction for a positive offset value for a Rebar-to-Rebar constraint.
• RebarConstraint.GetPositiveOffsetDirectionForToOtherRebarConstraint()
• Element.EvaluateAllParameterValues()
• Element.EvaluateParameterValues()
• EvaluatedParameter
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:
• EvaluatedParameter.Definition
• EvaluatedParameter.Value
• EvaluatedParameter.StorageType
• EvaluatedParameter.HasValue
• Autodesk.Revit.DB.GroupLoadOptions
provides options for loading the Revit group from the file.
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.
• GroupType.LoadFrom(string, GroupLoadOptions)
• Autodesk.Revit.DB.RevitLinkGraphicsSettings
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.
• Autodesk.Revit.DB.ParameterDownloadOptions
is an option class used for downloading parameters from the Parameters Service.
2.16.2. ParameterUtils
The new methods:
• Autodesk.Revit.DB.Electrical.ElectricalAnalyticalLoadSet
2.17.2. AreaBasedLoadData
The new methods:
2.17.3. PointLoadData
The new property:
2.17.4. ElectricalAnalyticalNode
The new method:
• Autodesk.Revit.DB.Structure.RebarBendingDetailType
• Autodesk.Revit.DB.Structure.RebarBendingDetail
• Autodesk.Revit.DB.Structure.BendingDetailTypeMultipleValuesIndicatorOptions
allows users to describe how the parameters with multiple values will be represented. It has the following
values:
• Autodesk.Revit.DB.Structure.BendingDetailLevelOfDetail
allows users to describe the level of detail in which the Bending Detail will be represented. It has the
following values:
• Autodesk.Revit.DB.IndependentTag.HasTagBehavior()
2.18.3. LoadBase
The new methods:
2.18.4. LineLoad
Three new methods support custom line loads:
• LineLoad.Create()
• LineLoad.IsCurveInsideHostBoundaries() - Allows users to determine if the curve is inside panel's
boundaries or if the curve is on the member's curve.
• LineLoad.SetCurve()
2.18.5. AreaLoad
Several new methods support custom area loads:
2.18.6. PointLoad
Two new methods support custom point loads:
• PointLoad.Create()
• PointLoad.IsPointInsideHostBoundaries() - Allows users to indicate if the point is inside panel
boundaries or is on the member's curve.
• Autodesk.Revit.DB.Structure.StructuralSettings.GetLoadForceVectorReprLine()
• Autodesk.Revit.DB.Structure.StructuralSettings.SetValuesForLoadsDisplayScaling()
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.
• Autodesk.Revit.DB.Structure.StructuralSettings.UseLoadsDisplayScaling
represents whether to use loads display scaling. If disabled then loads are displayed according to force
scale type parameters.
• Autodesk.Revit.DB.Structure.BendingDetailCustomFieldProperties
It has many properties. (Please see the RevitAPI.chm for full documentation.) Some notable ones
include:
• Autodesk.Revit.DB.FabricationServiceSettings
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.
• ViewSchedule.RowHeightOverride - Allows users to define the override that is applied to the row
height.
• ViewSchedule.RowHeight - Allows users to define the schedule body rows height. The property is
applied only for when the schedule is placed on sheet as a ScheduleSheetInstance.
• Autodesk.Revit.DB.RowHeightOverrideOptions
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.
• Revision - Represents the parameter of the revision element that the scheduled revision cloud
element belongs to.
• Views - Represents the parameter of the primary view owning an annotation element (e.g.
Revision Cloud.)
2.21.4. HostCount
We have also added the ability to identify the HostCount in Autodesk.Revit.DB.ScheduleFieldType:
• Autodesk.Revit.DB.ScheduleVerticalAlignment
The new class Autodesk.Revit.DB.CustomFieldData allows users access to the information about a
custom field.
• FieldName
• FieldTooltip - Represents the tooltip that will be shown in the schedule properties dialog for this
custom field.
• DefaultRowHeightOnSheet - Identifies the default row height for this field.
The new interface Autodesk.Revit.DB.ICustomFieldProperties represents the base class for the
properties of a custom field.
The method:
• AreEqualTo(ICustomFieldProperties otherProperties)
allows users to identify if two custom field properties are equal or not.
• TableSectionData.GetCustomFieldId()
• SupportActivation
• Autodesk.Revit.DB.ViewSheet.GetAllRevisionCloudIds()
allows users to get the ids of the revision clouds which appear on the sheet's revision schedules.
• Autodesk.Revit.DB.ExternallyTaggedNonBReps
• Autodesk.Revit.DB.ExternallyTaggedNonBRepUsage
represents the ways in which an ExternallyTaggedNonBRep can be used in Revit. It has the following
values:
• Displayable
• Selectable
• Snappable
• Referenceable
2.25.2. ThemeChangedEventArgs
The new class :
• Autodesk.Revit.UI.Events.ThemeChangedEventArgs
2.25.3. Selection
The new value for enum Autodesk.Revit.UI.Selection.ObjectSnapTypes
• Autodesk.Revit.DB.Mechanical.DuctSettings.NetworkBasedCalculations
• Autodesk.Revit.DB.Toposolid
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.
• Autodesk.Revit.DB.ToposolidType
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.
• ToposolidType.GetContourSetting()
• EvaluatedParameter.AsValueString(Document, FormatOptions)
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)
• Document.CreationGUID
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