Create Method (Document, Element, IList(Curve), Boolean, ElementId, ElementId, ElementId, ElementId, ElementId)


Creates a new PathReinforcement object from an array of curves and given Rebar Shape id.

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 PathReinforcement Create(
	Document document,
	Element hostElement,
	IList<Curve> curveArray,
	bool flip,
	ElementId pathReinforcementTypeId,
	ElementId rebarBarTypeId,
	ElementId startRebarHookTypeId,
	ElementId endRebarHookTypeId,
	ElementId rebarShapeId
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	hostElement As Element, _
	curveArray As IList(Of Curve), _
	flip As Boolean, _
	pathReinforcementTypeId As ElementId, _
	rebarBarTypeId As ElementId, _
	startRebarHookTypeId As ElementId, _
	endRebarHookTypeId As ElementId, _
	rebarShapeId As ElementId _
) As PathReinforcement
Visual C++
public:
static PathReinforcement^ Create(
	Document^ document, 
	Element^ hostElement, 
	IList<Curve^>^ curveArray, 
	bool flip, 
	ElementId^ pathReinforcementTypeId, 
	ElementId^ rebarBarTypeId, 
	ElementId^ startRebarHookTypeId, 
	ElementId^ endRebarHookTypeId, 
	ElementId^ rebarShapeId
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document.
hostElement
Type: Autodesk.Revit.DB Element
The element that will host the PathReinforcement. The host can be a Structural Floor, Structural Wall, Structural Slab, or a Part created from a structural layer belonging to one of those element types.
curveArray
Type: System.Collections.Generic IList Curve
An array of curves that will define the outline of the PathReinforcement.
flip
Type: System Boolean
A flag controlling the bars relative to the curves.
pathReinforcementTypeId
Type: Autodesk.Revit.DB ElementId
The id of the PathReinforcementType.
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.
rebarShapeId
Type: Autodesk.Revit.DB ElementId
The id of the RebarShape element that defines the shape of the rebars in the object.

Return Value

The newly created PathReinforcement.

Remarks

The method sets Rebar Shape of primary bars only.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The input curveArray is empty. -or- The input curveArray contains at least one helical curve and is not supported for this operation. -or- The element hostElement was not found in the given document. -or- the host Element is not a valid host for Area Reinforcement, Path Reinforcement, Fabric Area or Fabric Sheet. -or- The structural rebar is not within area and path reinforcement. -or- curves in curveArray are not continuous and open. -or- pathReinforcementTypeId should refer to an Path Reinforcement Type element. -or- 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. -or- rebarShapeId should refer to two dimensional Rebar Shape element with segments forming only right angles.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions ArgumentsInconsistentException startRebarHookTypeId cannot be set for given rebar shape. -or- endRebarHookTypeId cannot be set for given rebar shape.
Autodesk.Revit.Exceptions DisabledDisciplineException None of the following disciplines is enabled: Structural.
Autodesk.Revit.Exceptions ForbiddenForDynamicUpdateException This method may not be called during dynamic update.

See Also