Create Method (Document, RebarShapeDefinition, RebarShapeMultiplanarDefinition, RebarStyle, StirrupTieAttachmentType, Int32, RebarHookOrientation, Int32, RebarHookOrientation, Int32, Double, Double, ElementId, ElementId)


Create a new instance of a Rebar Shape, which defines the shape of a rebar.

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

Syntax

C#
public static RebarShape Create(
	Document doc,
	RebarShapeDefinition definition,
	RebarShapeMultiplanarDefinition multiplanarDefinition,
	RebarStyle style,
	StirrupTieAttachmentType attachmentType,
	int startHookAngle,
	RebarHookOrientation startHookOrientation,
	int endHookAngle,
	RebarHookOrientation endHookOrientation,
	int higherEnd,
	double hookRotationAngleAtStart,
	double hookRotationAngleAtEnd,
	ElementId endTreatmentTypeIdAtStart,
	ElementId endTreatmentTypeIdAtEnd
)
Visual Basic
Public Shared Function Create ( _
	doc As Document, _
	definition As RebarShapeDefinition, _
	multiplanarDefinition As RebarShapeMultiplanarDefinition, _
	style As RebarStyle, _
	attachmentType As StirrupTieAttachmentType, _
	startHookAngle As Integer, _
	startHookOrientation As RebarHookOrientation, _
	endHookAngle As Integer, _
	endHookOrientation As RebarHookOrientation, _
	higherEnd As Integer, _
	hookRotationAngleAtStart As Double, _
	hookRotationAngleAtEnd As Double, _
	endTreatmentTypeIdAtStart As ElementId, _
	endTreatmentTypeIdAtEnd As ElementId _
) As RebarShape
Visual C++
public:
static RebarShape^ Create(
	Document^ doc, 
	RebarShapeDefinition^ definition, 
	RebarShapeMultiplanarDefinition^ multiplanarDefinition, 
	RebarStyle style, 
	StirrupTieAttachmentType attachmentType, 
	int startHookAngle, 
	RebarHookOrientation startHookOrientation, 
	int endHookAngle, 
	RebarHookOrientation endHookOrientation, 
	int higherEnd, 
	double hookRotationAngleAtStart, 
	double hookRotationAngleAtEnd, 
	ElementId^ endTreatmentTypeIdAtStart, 
	ElementId^ endTreatmentTypeIdAtEnd
)

Parameters

doc
Type: Autodesk.Revit.DB Document
A document to contain the RebarShape.
definition
Type: Autodesk.Revit.DB.Structure RebarShapeDefinition
The definition of the rebar shape, as a set of curves in a plane driven by parameters.
multiplanarDefinition
Type: Autodesk.Revit.DB.Structure RebarShapeMultiplanarDefinition
If not a null reference ( Nothing in Visual Basic) , the created RebarShape will be a 3D shape. The shape is built out of the planar RebarShapeDefinition, with additional out-of-plane segments defined by the RebarShapeMultiplanarDefinition object. Not supported in conjunction with RebarShapeDefinitionByArc of type Spiral or LappedCircle.
style
Type: Autodesk.Revit.DB.Structure RebarStyle
Whether the shape is to be used as a standard bar or a stirrup/tie.
attachmentType
Type: Autodesk.Revit.DB.Structure StirrupTieAttachmentType
When the style is stirrup/tie, specify whether it will attach to the interior of cover (cover is measured to the stirrups), or to the exterior of cover (cover is measured to the standard bars). Ignored when the style is Standard.
startHookAngle
Type: System Int32
The start hook angle, expressed as an integral number of degrees. If 0, the shape will have no start hook. Common values are 0, 90, 135, and 180.
startHookOrientation
Type: Autodesk.Revit.DB.Structure RebarHookOrientation
The orientation of the start hook. Ignored when startHookAngle is 0.
endHookAngle
Type: System Int32
The end hook angle, expressed as an integral number of degrees. If 0, the shape will have no end hook. Common values are 0, 90, 135, and 180.
endHookOrientation
Type: Autodesk.Revit.DB.Structure RebarHookOrientation
The orientation of the end hook. Ignored when endHookAngle is 0.
higherEnd
Type: System Int32
When the rebar crosses itself, one end will be "lifted" to avoid self-intersection. Specify which end should be lifted: 0 for start, 1 for end.
hookRotationAngleAtStart
Type: System Double
The out of plane hook rotation angle at the start of the bar.
hookRotationAngleAtEnd
Type: System Double
The out of plane hook rotation angle at the end of the bar.
endTreatmentTypeIdAtStart
Type: Autodesk.Revit.DB ElementId
The end treatment type id at the start of the bar.
endTreatmentTypeIdAtEnd
Type: Autodesk.Revit.DB ElementId
The end treatment type id at the end of the bar.

Return Value

A new RebarShape instance.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException definition is linked to a Document other than doc. -or- A multiplanar definition is specified when the given RebarShapeDefinition does not support it. The following RebarShapeDefinitions do not support multiplanar: a simple line; spiral; lapped circle. -or- The DepthParamId property of multiplanarDefinition is invalid or has not been added to definition. -or- the parameter endTreatmentTypeIdAtStart is not an EndTreatmentType element. -or- the parameter endTreatmentTypeIdAtEnd is not an EndTreatmentType element.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions ArgumentOutOfRangeException startHookAngle must be at least 0 and no more than 180. -or- endHookAngle must be at least 0 and no more than 180. -or- higherEnd must be 0 or 1. -or- A value passed for an enumeration argument is not a member of that enumeration
Autodesk.Revit.Exceptions DisabledDisciplineException None of the following disciplines is enabled: Structural.

See Also