Create Method


Creates a new instance of a Rebar Container element within the project.

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 RebarContainer Create(
	Document aDoc,
	Element hostElement,
	ElementId rebarContainerTypeId
)
Visual Basic
Public Shared Function Create ( _
	aDoc As Document, _
	hostElement As Element, _
	rebarContainerTypeId As ElementId _
) As RebarContainer
Visual C++
public:
static RebarContainer^ Create(
	Document^ aDoc, 
	Element^ hostElement, 
	ElementId^ rebarContainerTypeId
)

Parameters

aDoc
Type: Autodesk.Revit.DB Document
A document.
hostElement
Type: Autodesk.Revit.DB Element
The element that will host the RebarContainer.
rebarContainerTypeId
Type: Autodesk.Revit.DB ElementId
The id of the RebarContainerType.

Return Value

The newly created Rebar Container instance.

Remarks

Created Rebar Container starts out empty. Use appendItemFromRebar, appendItemFromCurves, appendItemFromRebarShape, appendItemFromCurvesAndShape to fill its content.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The element hostElement was not found in the given document. -or- hostElement is not a valid rebar host. -or- the ElementId rebarContainerTypeId is either invalid or not a RebarContainerType.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions DisabledDisciplineException None of the following disciplines is enabled: Structural.

See Also