RebarSpliceUtilsSpliceRebar(Document, ElementId, RebarSpliceOptions, Line, ElementId) Method

Splice a Rebar with a line.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public static IList<ElementId> SpliceRebar(
	Document document,
	ElementId rebarIdToSplice,
	RebarSpliceOptions spliceOptions,
	Line line,
	ElementId viewId
)

Parameters

document  Document
The document
rebarIdToSplice  ElementId
Rebar id to splice.
spliceOptions  RebarSpliceOptions
The rebar splice options.
line  Line
The line used for splice.
viewId  ElementId
Based on the view it will be determined the plane of the line.

Return Value

IListElementId
Returns the ids of the rebars that are considered to be spliced.
Exceptions
ExceptionCondition
ArgumentException Free Form Rebars other than Morphed, or Shape Driven Rebars that are Multiplanar or have a shape whose definition is RebarShapeDefinitionByArc can't be spliced. Also, if the Rebar is member of a Group it cannot be spliced. -or- The rebar cannot be spliced with the provided line.
ArgumentNullException A non-optional argument was null
Remarks

This method uses the view normal in case of a 2D view and the current workplane normal in case of a 3D view.

If the view normal is parallel with the bar plane normal the bounded line will be used to calculate the splice geometries where the bar will be spliced.

Otherwise, the line will be extended to exceed the bounding box of the bar.

See Also