StretchAndFit Method


Stretch the fabrication part from the specified connector and fit to the target routing end.

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

Syntax

C#
public static FabricationPartFitResult StretchAndFit(
	Document document,
	Connector stretchConnector,
	FabricationPartRouteEnd target,
	out ISet<ElementId> newPartIds
)
Visual Basic
Public Shared Function StretchAndFit ( _
	document As Document, _
	stretchConnector As Connector, _
	target As FabricationPartRouteEnd, _
	<OutAttribute> ByRef newPartIds As ISet(Of ElementId) _
) As FabricationPartFitResult
Visual C++
public:
static FabricationPartFitResult StretchAndFit(
	Document^ document, 
	Connector^ stretchConnector, 
	FabricationPartRouteEnd^ target, 
	[OutAttribute] ISet<ElementId^>^% newPartIds
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The document in which to perform the stretch and fit.
stretchConnector
Type: Autodesk.Revit.DBConnector
The connector of the fabrication part to be stretched.
target
Type: Autodesk.Revit.DB.FabricationFabricationPartRouteEnd
The target routing end to align and fit to.
newPartIds
Type: System.Collections.GenericISetElementId%
New fabrication part element identifiers.

Return Value

Returns FabricationPartFitResult::Success if successful.

Remarks

Cannot stretch and fit fabrication part straight, tap or hanger.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException Connector does not belong to a fabrication part with a valid fabrication service. -or- Connector is connected. -or- Connector belongs to a fabrication part straight, tap, or hanger. -or- Routing end is valid to route to. -or- stretch target end type must be a supported type.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException fabrication part is not connected at one end only. -or- cannot stretch fabrication part to a different service.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →