NewUnionFitting Method


Add a new family instance of an union fitting into the Autodesk Revit document, using two connectors.

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

Syntax

C#
public FamilyInstance NewUnionFitting(
	Connector connector1,
	Connector connector2
)
Visual Basic
Public Function NewUnionFitting ( _
	connector1 As Connector, _
	connector2 As Connector _
) As FamilyInstance
Visual C++
public:
FamilyInstance^ NewUnionFitting(
	Connector^ connector1, 
	Connector^ connector2
)

Parameters

connector1
Type: Autodesk.Revit.DBConnector
The first connector to be connected to the union.
connector2
Type: Autodesk.Revit.DBConnector
The second connector to be connected to the union.

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.ExceptionsArgumentNullException Thrown when the input argument connector1 or connector2 is a null reference (Nothing in Visual Basic).
Autodesk.Revit.ExceptionsArgumentException Thrown when the connectors cannot be used for union creation. For example, they cannot be from the same element, they must be of the same domain and shape, and the owner of the connector1 should be a (flex) duct or pipe.
Autodesk.Revit.ExceptionsInvalidOperationException Thrown when union fitting cannot be created.

See Also