PlaceFittingAsCutIn Method


Places the fitting on the straight part by cut in, use the fitting's focal point as the insertion position.

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

Syntax

C#
public static bool PlaceFittingAsCutIn(
	Document document,
	ElementId straightId,
	ElementId fittingId,
	XYZ position,
	Connector fittingConnector,
	double axisRotation
)
Visual Basic
Public Shared Function PlaceFittingAsCutIn ( _
	document As Document, _
	straightId As ElementId, _
	fittingId As ElementId, _
	position As XYZ, _
	fittingConnector As Connector, _
	axisRotation As Double _
) As Boolean
Visual C++
public:
static bool PlaceFittingAsCutIn(
	Document^ document, 
	ElementId^ straightId, 
	ElementId^ fittingId, 
	XYZ^ position, 
	Connector^ fittingConnector, 
	double axisRotation
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The document.
straightId
Type: Autodesk.Revit.DBElementId
Identifier of the straight to be cut in.
fittingId
Type: Autodesk.Revit.DBElementId
Identifier of the fitting to cut in.
position
Type: Autodesk.Revit.DBXYZ
The position to cut in the straight.
fittingConnector
Type: Autodesk.Revit.DBConnector
The connector of the fitting to align with the primary connector of the straight part.
axisRotation
Type: SystemDouble
Rotation around the direction of connection - angle between width vectors in radians.

Return Value

True if cuts in successful.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException For rectangular and oval parts the axis rotation must be a multiple of PI/2. -or- The fitting connector is not a connector of the fitting. -or- The fitting connector is not valid, it is not within a pair connector for cutting in.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException Failed to align fitting to the straight to cut in. -or- There is no enough room in the run for cut in.

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 →