CurveByPointsUtils.CreateRectangle
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.
public static void CreateRectangle(
Document document,
ReferencePoint startPoint,
ReferencePoint endPoint,
CurveProjectionType projectionType,
bool boundaryReferenceLines,
bool boundaryCurvesFollowSurface,
out IList<ElementId> createdCurvesIds,
out IList<ElementId> createdCornersIds
)
-
documentThe Document.
-
startPointFirst diagonal point of rectangle.
-
endPointSecond diagonal point of rectangle.
-
projectionTypeProjection 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.
-
BooleanboundaryReferenceLinesTrue if rectangle's boundary curves should be reference lines, false otherwise.
-
BooleanboundaryCurvesFollowSurfaceTrue if rectangle's boundary curves should follow surface, false otherwise.
-
IList<ElementId>%createdCurvesIdsCreated rectangle's boundary curves ids.
-
IList<ElementId>%createdCornersIdsIds of two newly created corner points.
-
A non-optional argument was null
-
Unexpected projection type. -or- A value passed for an enumeration argument is not a member of that enumeration
-
Unable to create rectangle.