Creates rectangle on face or sketchplane for two given diagonal points.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2012
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
- Type: Autodesk.Revit.DBDocument
The Document.
- startPoint
- Type: Autodesk.Revit.DBReferencePoint
First diagonal point of rectangle.
- endPoint
- Type: Autodesk.Revit.DBReferencePoint
Second diagonal point of rectangle.
- projectionType
- Type: Autodesk.Revit.DBCurveProjectionType
Projection type of rectangle's boundary curves. If the rectangle input points are Face hosted, and CurveProjectionType::ParallelToLevel is requested, and the Face normal at the location of the start point is at a less than 45 degree angle with the level planes, then the projectionType will be set to FromTopDown, even if ParallelToLevel was requested.
- boundaryReferenceLines
- Type: SystemBoolean
True if rectangle's boundary curves should be reference lines, false otherwise.
- boundaryCurvesFollowSurface
- Type: SystemBoolean
True if rectangle's boundary curves should follow surface, false otherwise.
- createdCurvesIds
- Type: System.Collections.GenericIListElementId%
Created rectangle's boundary curves ids.
- createdCornersIds
- Type: System.Collections.GenericIListElementId%
Ids of two newly created corner points.
Remarks
This array contains the ElementIds of the two additional corner points that are created to complete the rectangle.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |
Autodesk.Revit.ExceptionsArgumentOutOfRangeException | Unexpected projection type. -or- A value passed for an enumeration argument is not a member of that enumeration |
Autodesk.Revit.ExceptionsInvalidOperationException | Unable to create rectangle. |