Creates a view-specific masking region from the given boundaries.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2024
Syntax
C# |
---|
public static FilledRegion CreateMaskingRegion( Document document, ElementId viewId, IList<CurveLoop> boundaries ) |
Visual Basic |
---|
Public Shared Function CreateMaskingRegion ( _ document As Document, _ viewId As ElementId, _ boundaries As IList(Of CurveLoop) _ ) As FilledRegion |
Visual C++ |
---|
public: static FilledRegion^ CreateMaskingRegion( Document^ document, ElementId^ viewId, IList<CurveLoop^>^ boundaries ) |
Parameters
- document
- Type: Autodesk.Revit.DB..::..Document
The document in which to create the masking region.
- viewId
- Type: Autodesk.Revit.DB..::..ElementId
The view Id.
- boundaries
- Type: System.Collections.Generic..::..IList<(Of <(<'CurveLoop>)>)>
The boundaries.
Return Value
The newly created masking region.
Remarks
View-specific masking regions can be created in models and 2d families.
The line style of the boundaries will be set to thin lines by default.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | The document is a 3d model family. -or- Details can't be drawn in the view. -or- Masking regions and Filled regions can't be created in this document or view. -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 view's detail sketch plane; or input curves contain at least one helical curve. -or- Thrown if the viewId is invalid, or the view does not support the detail items creation, or if the boundaries are empty, open, or self-intersecting. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was null |