SetEndTreatmentTypeId Method


Sets the id of the EndTreatmentType to be applied to the rebar. This can be done if and only if the end of the bar on which the end treatment is applied has no RebarCoupler on it, otherwise will throw an exception. If a RebarHookType is present at the rebar end, it will automatically set to invalidElementId.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2021

Syntax

C#
public void SetEndTreatmentTypeId(
	int end,
	ElementId endTreatmentTypeId
)
Visual Basic
Public Sub SetEndTreatmentTypeId ( _
	end As Integer, _
	endTreatmentTypeId As ElementId _
)
Visual C++
public:
void SetEndTreatmentTypeId(
	int end, 
	ElementId^ endTreatmentTypeId
)

Parameters

end
Type: System Int32
0 for the start end treatment, 1 for the end end treatment.
endTreatmentTypeId
Type: Autodesk.Revit.DB ElementId
The id of a EndTreatmentType element, or invalidElementId if the rebar should have no end treatment at the specified end.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException the parameter endTreatmentTypeId is not an EndTreatmentType element.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions ArgumentOutOfRangeException end must be 0 or 1.
Autodesk.Revit.Exceptions DisabledDisciplineException None of the following disciplines is enabled: Structural.
Autodesk.Revit.Exceptions InvalidOperationException the Rebar end end has a RebarCoupler on it.

See Also