2027 Method
Changes 0
M

CurveByPointsUtils.CreateRectangle

Description:
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.
public static void CreateRectangle(
	Document document,
	ReferencePoint startPoint,
	ReferencePoint endPoint,
	CurveProjectionType projectionType,
	bool boundaryReferenceLines,
	bool boundaryCurvesFollowSurface,
	out IList<ElementId> createdCurvesIds,
	out IList<ElementId> createdCornersIds
)
  • document
    The Document.
  • startPoint
    First diagonal point of rectangle.
  • endPoint
    Second diagonal point of rectangle.
  • projectionType
    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.
  • Boolean
    boundaryReferenceLines
    True if rectangle's boundary curves should be reference lines, false otherwise.
  • Boolean
    boundaryCurvesFollowSurface
    True if rectangle's boundary curves should follow surface, false otherwise.
  • IList<ElementId>%
    createdCurvesIds
    Created rectangle's boundary curves ids.
  • IList<ElementId>%
    createdCornersIds
    Ids of two newly created corner points.