Create Method (Document, ElementId, SketchPlane, IList(CurveLoop))


Creates a filled region on a sketch plane in a 3d model family.

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

Syntax

C#
public static FilledRegion Create(
	Document document,
	ElementId typeId,
	SketchPlane sketchPlane,
	IList<CurveLoop> boundaries
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	typeId As ElementId, _
	sketchPlane As SketchPlane, _
	boundaries As IList(Of CurveLoop) _
) As FilledRegion
Visual C++
public:
static FilledRegion^ Create(
	Document^ document, 
	ElementId^ typeId, 
	SketchPlane^ sketchPlane, 
	IList<CurveLoop^>^ boundaries
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The family document in which to create the filled region.
typeId
Type: Autodesk.Revit.DBElementId
The filled region type Id.
sketchPlane
Type: Autodesk.Revit.DBSketchPlane
The sketch plane for use with the filled region.
boundaries
Type: System.Collections.GenericIListCurveLoop
The filled region boundaries, which will be projected onto the sketch plane.

Return Value

The new filled region.

Remarks

If the sketch plane is currently in use, then a copy of the sketch plane will be created and used. The sketch plane normal must be parallel to the model's X, Y or Z axis. The sketch plane can be a planar face reference to model geometry. The line style of the boundaries will be set to thin lines by default.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The document is not a 3d model family. -or- The Id typeId is invalid. -or- Filled regions can't be created in this document or view. -or- The sketch plane is not suitable for model elements. -or- The sketch plane normal is not parallel to the model's X, Y or Z axis. -or- The input curve loops cannot compose a valid boundary, that means: the "curveLoops" collection is empty; or some curve loops intersect with each other; or each curve loop is not closed individually; or each curve loop is not planar; or each curve loop is not in a plane parallel to the sketch plane; or input curves contain at least one helical curve.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →