GetOrCreateDefaultRebarShape Method


Creates a new RebarShape object with a default name or returns existing one which fulfills Path Reinforcement bending data requirements.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 16.0.0.0 (16.0.0.0)
Since: 2016

Syntax

C#
public static ElementId GetOrCreateDefaultRebarShape(
	Document document,
	ElementId rebarBarTypeId,
	ElementId startRebarHookTypeId,
	ElementId endRebarHookTypeId
)
Visual Basic
Public Shared Function GetOrCreateDefaultRebarShape ( _
	document As Document, _
	rebarBarTypeId As ElementId, _
	startRebarHookTypeId As ElementId, _
	endRebarHookTypeId As ElementId _
) As ElementId
Visual C++
public:
static ElementId^ GetOrCreateDefaultRebarShape(
	Document^ document, 
	ElementId^ rebarBarTypeId, 
	ElementId^ startRebarHookTypeId, 
	ElementId^ endRebarHookTypeId
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document.
rebarBarTypeId
Type: Autodesk.Revit.DB ElementId
The id of the RebarBarType.
startRebarHookTypeId
Type: Autodesk.Revit.DB ElementId
The id of the RebarHookType for the start of the bar. If this parameter is InvalidElementId, it means to create a rebar with no start hook.
endRebarHookTypeId
Type: Autodesk.Revit.DB ElementId
The id of the RebarHookType for the end of the bar. If this parameter is InvalidElementId, it means to create a rebar with no end hook.

Return Value

Rebar Shape id.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException rebarBarTypeId should refer to an RebarBarType element. -or- startRebarHookTypeId should be invalid or refer to an RebarHookType element. -or- endRebarHookTypeId should be invalid or refer to an RebarHookType element.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL

See Also