SetCropShape Method


Sets the boundary of the view's crop to the specified shape.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2014

Syntax

C#
public void SetCropShape(
	CurveLoop boundary
)
Visual Basic
Public Sub SetCropShape ( _
	boundary As CurveLoop _
)
Visual C++
public:
void SetCropShape(
	CurveLoop^ boundary
)

Parameters

boundary
Type: Autodesk.Revit.DB CurveLoop
The crop boundary.

Remarks

Depending on the shape of the argument, view's crop is set to be either rectangular or non-rectangular. If the crop is set to be rectangular and it is also split, then the multiple view regions will be displayed for the view, with the same proportions as the split prior to the change, but adjusted to the new rectangular shape.

This Method is reserved for setting crop shape in views that allow non-rectangular crop shapes - see property CanHaveShape . For views that don't allow non-rectangular crop shapes (e.g. View3D ), please use property CropBox for that purpose.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException Boundary in boundary should represent one closed curve loop without self-intersections, consisting of non-zero length straight lines in a plane parallel to the view plane.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions InvalidOperationException The crop of the associated view is not permitted to have a non-rectangular shape.

See Also