SplitRegionHorizontally Method


Splits horizontally one region in split crop.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2016

Syntax

C#
public void SplitRegionHorizontally(
	int regionIndex,
	double leftPart,
	double rightPart
)
Visual Basic
Public Sub SplitRegionHorizontally ( _
	regionIndex As Integer, _
	leftPart As Double, _
	rightPart As Double _
)
Visual C++
public:
void SplitRegionHorizontally(
	int regionIndex, 
	double leftPart, 
	double rightPart
)

Parameters

regionIndex
Type: SystemInt32
Index of region to be split horizontally (numbering starts with 0).
leftPart
Type: SystemDouble
Relative portion of the original region to become the new left region (0 to 1).
rightPart
Type: SystemDouble
Relative portion of the original region to become the new right region (0 to 1).

Remarks

This function splits the crop into two regions: one occupying the left quarter of the crop, and the other the right quarter of the crop.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The provided view region proportions are not valid. -or- The provided region index is invalid.
Autodesk.Revit.ExceptionsInvalidOperationException The crop of the associated view is not permitted to have multiple regions. -or- The view has non-rectangular crop shape set. -or- The view crop is already split vertically.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →