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


Creates a FabricArea from an array of curves.

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 FabricArea Create(
	Document aDoc,
	Element hostElement,
	IList<CurveLoop> curveLoops,
	XYZ majorDirection,
	XYZ majorDirectionOrigin,
	ElementId fabricAreaTypeId,
	ElementId fabricSheetTypeId
)
Visual Basic
Public Shared Function Create ( _
	aDoc As Document, _
	hostElement As Element, _
	curveLoops As IList(Of CurveLoop), _
	majorDirection As XYZ, _
	majorDirectionOrigin As XYZ, _
	fabricAreaTypeId As ElementId, _
	fabricSheetTypeId As ElementId _
) As FabricArea
Visual C++
public:
static FabricArea^ Create(
	Document^ aDoc, 
	Element^ hostElement, 
	IList<CurveLoop^>^ curveLoops, 
	XYZ^ majorDirection, 
	XYZ^ majorDirectionOrigin, 
	ElementId^ fabricAreaTypeId, 
	ElementId^ fabricSheetTypeId
)

Parameters

aDoc
Type: Autodesk.Revit.DBDocument
The document.
hostElement
Type: Autodesk.Revit.DBElement
The element that will host the FabricArea. 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.
curveLoops
Type: System.Collections.GenericIListCurveLoop
An array of curves that will define the outline of the FabricArea. This includes curves defining openings in the interior of the area.
majorDirection
Type: Autodesk.Revit.DBXYZ
A vector to define the major direction of the FabricArea.
majorDirectionOrigin
Type: Autodesk.Revit.DBXYZ
An origin point of the major direction line
fabricAreaTypeId
Type: Autodesk.Revit.DBElementId
The id of the FabricAreaType.
fabricSheetTypeId
Type: Autodesk.Revit.DBElementId
The id of the FabricSheetType.

Return Value

The newly created FabricArea.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException Not all curveLoops in curveLoops are closed and continuous. -or- Not all curveLoops in curveLoops are in the same plane. -or- curveLoops should only contain lines or arcs. -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- fabricAreaTypeId should refer to an FabricAreaType element. -or- fabricSheetTypeId should refer to an FabricSheetType element.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsArgumentOutOfRangeException majorDirection has zero length.

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 →