DocumentNewTakeoffFitting Method |
Add a new family instance of an takeoff fitting into the Autodesk Revit document,
using one connector and one MEP curve.
Namespace: Autodesk.Revit.CreationAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic FamilyInstance NewTakeoffFitting(
Connector connector,
MEPCurve curve
)
Public Function NewTakeoffFitting (
connector As Connector,
curve As MEPCurve
) As FamilyInstance
public:
FamilyInstance^ NewTakeoffFitting(
Connector^ connector,
MEPCurve^ curve
)
member NewTakeoffFitting :
connector : Connector *
curve : MEPCurve -> FamilyInstance
Parameters
- connector Connector
- The connector to be connected to the takeoff.
- curve MEPCurve
- The duct or pipe which is the trunk for the takeoff.
Return Value
FamilyInstanceIf creation was successful then an family instance to the new object is returned,
otherwise an exception with failure information will be thrown.
ExceptionsException | Condition |
---|
ArgumentNullException |
Thrown when the input argument connector1 or curve is .
|
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.
|
InvalidOperationException |
Thrown when takeoff fitting cannot be created.
|
ArgumentException | Thrown if the curve does not exist in the given document. |
See Also