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


Creates a new SiteSubRegion element with assigned TopographySurface to be hosted and adds it to the document.

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

Syntax

C#
[ObsoleteAttribute("This method is deprecated in Revit 2024 with the introduction of the new Toposolid elements.  It is recommended that Toposolid elements should be used in place of TopographySurface elements.")]
public static SiteSubRegion Create(
	Document document,
	IList<CurveLoop> curveLoops,
	ElementId hostTopoSurfaceId
)
Visual Basic
<ObsoleteAttribute("This method is deprecated in Revit 2024 with the introduction of the new Toposolid elements.  It is recommended that Toposolid elements should be used in place of TopographySurface elements.")> _
Public Shared Function Create ( _
	document As Document, _
	curveLoops As IList(Of CurveLoop), _
	hostTopoSurfaceId As ElementId _
) As SiteSubRegion
Visual C++
[ObsoleteAttribute(L"This method is deprecated in Revit 2024 with the introduction of the new Toposolid elements.  It is recommended that Toposolid elements should be used in place of TopographySurface elements.")]
public:
static SiteSubRegion^ Create(
	Document^ document, 
	IList<CurveLoop^>^ curveLoops, 
	ElementId^ hostTopoSurfaceId
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The document to be modified.
curveLoops
Type: System.Collections.GenericIListCurveLoop
The boundary of the subregion.
hostTopoSurfaceId
Type: Autodesk.Revit.DBElementId
The element id of a TopographySurface assigned to be a host of new created SiteSubRegion.

Return Value

The new SubRegion surface.

Remarks

This will create a new TopographySurface element which represents a subregion with a host TopographySurface assigned. If you need access to this Element you can obtain it from the TopographySurface property. See TopographySurface for details.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The input curve loops cannot compose a valid boundary, that means: no curve loop is contained in the given collection; these curve loops intersect with each other for some of them; 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 horizontal(XY) plane. -or- The ElementId hostTopoSurfaceId does not represent a TopographySurface.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException Failed to create the Sketch for the boundary of the current Subregion. -or- Cannot associate the new subregion with the assigned host because there is no geometric overlap, or they have mismatched design options. -or- The given curve loops intersect with curve loops of existing SiteSubRegions hosted on the same TopographySurface. -or- The boundary of SubRegion is entirely inside or overlaps at least one existing BuildingPad hosted on the same TopographySurface. This behavior is not allowed.
Autodesk.Revit.ExceptionsModificationForbiddenException The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process.
Autodesk.Revit.ExceptionsModificationOutsideTransactionException The document has no open transaction.

See Also