Add a new family instance of an takeoff fitting into the Autodesk Revit document, using one connector and one MEP curve.

Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)

Syntax

C#
public FamilyInstance NewTakeoffFitting(
	Connector connector,
	MEPCurve curve
)
Visual Basic
Public Function NewTakeoffFitting ( _
	connector As Connector, _
	curve As MEPCurve _
) As FamilyInstance
Visual C++
public:
FamilyInstance^ NewTakeoffFitting(
	Connector^ connector, 
	MEPCurve^ curve
)

Parameters

connector
Type: Autodesk.Revit.DB..::..Connector
The connector to be connected to the takeoff.
curve
Type: Autodesk.Revit.DB..::..MEPCurve
The duct or pipe which is the trunk for the takeoff.

Return Value

If creation was successful then an family instance to the new object is returned, otherwise an exception with failure information will be thrown.

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..ArgumentNullException Thrown when the input argument connector1 or curve is nullNothingnullptra null reference (Nothing in Visual Basic).
Autodesk.Revit.Exceptions..::..ArgumentException Thrown when the connector and the curve cannot be used for takeoff creation. For example, they must be of the same domain, the curve must be a duct or pipe, and the owner of the connector should be (flex) duct or pipe.
Autodesk.Revit.Exceptions..::..InvalidOperationException Thrown when takeoff fitting cannot be created.
Autodesk.Revit.Exceptions..::..ArgumentExceptionThrown if the curve does not exist in the given document.

See Also