SetRebarShapeId Method


Changes the RebarShape element that defines the shape of the rebar. Changing the value of this member causes the Rebar instance to choose values for its shape parameters to preserve its previous shape as closely as possible

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.0.0.420)
Since: 2018

Syntax

C#
public void SetRebarShapeId(
	ElementId shapeId
)
Visual Basic
Public Sub SetRebarShapeId ( _
	shapeId As ElementId _
)
Visual C++
public:
void SetRebarShapeId(
	ElementId^ shapeId
)

Parameters

shapeId
Type: Autodesk.Revit.DB ElementId

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException shapeId is not the id of a RebarShape in the document.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions DisabledDisciplineException None of the following disciplines is enabled: Structural.
Autodesk.Revit.Exceptions InvalidOperationException This RebarShapeDrivenAccessor doesn't contain a valid rebar reference.

See Also