Revit 2026 API
Rebar |
This method will unify the rebars by removing the splice between them. A new rebar will be created because of this operation.
The curves of the resulted rebar will be the curves of the first rebar continued by the curves of the second rebar.
The resulted rebar will take data from the first rebar. (e.g.. layout, moved/removed bars, etc.).
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public static ElementId UnifyRebarsIntoOne( Document document, ElementId firstRebarId, ElementId secondRebarId )
Public Shared Function UnifyRebarsIntoOne ( document As Document, firstRebarId As ElementId, secondRebarId As ElementId ) As ElementId
public: static ElementId^ UnifyRebarsIntoOne( Document^ document, ElementId^ firstRebarId, ElementId^ secondRebarId )
static member UnifyRebarsIntoOne : document : Document * firstRebarId : ElementId * secondRebarId : ElementId -> ElementId
Parameters
- document Document
- The document.
- firstRebarId ElementId
- First Rebar id.
- secondRebarId ElementId
- Second Rebar id.
Return Value
ElementIdReturns the id of the new rebar. In case that unify operation fails, it will return invalidElementId
| Exception | Condition |
|---|---|
| ArgumentException | Rebar elements must have a splice connection between them in order to be unified. |
| ArgumentNullException | A non-optional argument was null |
See Also