Create Method (Document, Element, XYZ, ElementId, ElementId, ElementId)


Creates a new AreaReinforcement object based on a host boundary.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2015

Syntax

C#
public static AreaReinforcement Create(
	Document document,
	Element hostElement,
	XYZ majorDirection,
	ElementId areaReinforcementTypeId,
	ElementId rebarBarTypeId,
	ElementId rebarHookTypeId
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	hostElement As Element, _
	majorDirection As XYZ, _
	areaReinforcementTypeId As ElementId, _
	rebarBarTypeId As ElementId, _
	rebarHookTypeId As ElementId _
) As AreaReinforcement
Visual C++
public:
static AreaReinforcement^ Create(
	Document^ document, 
	Element^ hostElement, 
	XYZ^ majorDirection, 
	ElementId^ areaReinforcementTypeId, 
	ElementId^ rebarBarTypeId, 
	ElementId^ rebarHookTypeId
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The document.
hostElement
Type: Autodesk.Revit.DBElement
The element that will host the AreaReinforcement. 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.
majorDirection
Type: Autodesk.Revit.DBXYZ
A vector to define the major direction of the AreaReinforcement.
areaReinforcementTypeId
Type: Autodesk.Revit.DBElementId
The id of the AreaReinforcementType.
rebarBarTypeId
Type: Autodesk.Revit.DBElementId
The id of the RebarBarType.
rebarHookTypeId
Type: Autodesk.Revit.DBElementId
The id of the RebarHookType. If this parameter is InvalidElementId, it means to create a rebar with no hooks.

Return Value

The newly created AreaReinforcement.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException 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- areaReinforcementTypeId should refer to an AreaReinforcementType element. -or- rebarBarTypeId should refer to an RebarBarType element. -or- rebarHookTypeId should be invalid or refer to an RebarHookType element.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsArgumentOutOfRangeException majorDirection has zero length.
Autodesk.Revit.ExceptionsForbiddenForDynamicUpdateException This method may not be called during dynamic update.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →