Revit 2022 API |
RebarFreeFormAccessor..::..SetReportedShape Method |
RebarFreeFormAccessor Class See Also |
This method changes the RebarShape of a Free Form Rebar that is using RebarWorkInstructions.Straight property to the provided RebarShape.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since:
2022
Syntax
C# |
---|
public void SetReportedShape( ElementId rebarShapeId ) |
Visual Basic |
---|
Public Sub SetReportedShape ( _ rebarShapeId As ElementId _ ) |
Visual C++ |
---|
public: void SetReportedShape( ElementId^ rebarShapeId ) |
Parameters
- rebarShapeId
- Type: Autodesk.Revit.DB..::..ElementId
Remarks
The Rebar element RebarWorkInstructions property should be Straight.
The rebarShapeId parameter should be the id of a straight RebarShape (single straight segment, no RebarHookType, no EndTreatmentType).
Moreover the straight RebarShape RebarStyle should match ( if the current RebarShape RebarStyle is Standard then the RebarShape cannot be changed to a straigh RebarShape using the RebarStyle Stirrup/Tie ).
If current RebarShape and the provided rebarShapeId has Stirrup/Tie RebarStyle then also the StirrupTieAttachmentType should match ( both InteriorFace or ExteriorFace ).
Exceptions
Exception | Condition |
---|---|
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 | rebarShapeId cannot be set as a reporting RebarShape for this Rebar element. |