CurveByPointsUtils.CreateRectangle
Method
Description:
Creates rectangle on face or sketchplane for two given diagonal points.
Creates rectangle on face or sketchplane for two given diagonal points.
Remarks:
This array contains the ElementIds of the two additional corner points that are created to complete the rectangle.
This array contains the ElementIds of the two additional corner points that are created to complete the rectangle.
Syntax
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
Parameter | Type | Description |
---|---|---|
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 | Created rectangle's boundary curves ids. |
createdCornersIds | IList | Ids of two newly created corner points. |
Return Value
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | A non-optional argument was null |
ArgumentOutOfRangeException | Unexpected projection type. -or- A value passed for an enumeration argument is not a member of that enumeration |
InvalidOperationException | Unable to create rectangle. |