Creates rectangle on face or sketchplane for two given diagonal points.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 26.4.0.0 (26.4.0.0)
Syntax
C#
public static void CreateRectangle(
Document document,
ReferencePoint startPoint,
ReferencePoint endPoint,
CurveProjectionType projectionType,
bool boundaryReferenceLines,
bool boundaryCurvesFollowSurface,
out IList<ElementId> createdCurvesIds,
out IList<ElementId> createdCornersIds
)
Parameters
- document Document
-
The Document.
- startPoint ReferencePoint
-
First diagonal point of rectangle.
- endPoint ReferencePoint
-
Second diagonal point of rectangle.
- projectionType CurveProjectionType
-
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 Boolean
-
True if rectangle's boundary curves should be reference lines, false otherwise.
- boundaryCurvesFollowSurface Boolean
-
True if rectangle's boundary curves should follow surface, false otherwise.
- createdCurvesIds IList<ElementId>%
-
Created rectangle's boundary curves ids.
- createdCornersIds IList<ElementId>%
-
Ids of two newly created corner points.
Exceptions
Remarks
This array contains the ElementIds of the two additional corner points that are created to complete the rectangle.
See Also
Reference