Add a new family instance of a cross fitting into the Autodesk Revit document,
using four connectors.
Namespace: Autodesk.Revit.CreationAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Syntax
C# |
---|
public FamilyInstance NewCrossFitting( Connector connector1, Connector connector2, Connector connector3, Connector connector4 ) |
Visual Basic |
---|
Public Function NewCrossFitting ( _ connector1 As Connector, _ connector2 As Connector, _ connector3 As Connector, _ connector4 As Connector _ ) As FamilyInstance |
Visual C++ |
---|
public: FamilyInstance^ NewCrossFitting( Connector^ connector1, Connector^ connector2, Connector^ connector3, Connector^ connector4 ) |
Parameters
- connector1
- Type: Autodesk.Revit.DB..::..Connector
The first connector to be connected to the cross.
- connector2
- Type: Autodesk.Revit.DB..::..Connector
The second connector to be connected to the cross.
- connector3
- Type: Autodesk.Revit.DB..::..Connector
The third connector to be connected to the cross.
- connector4
- Type: Autodesk.Revit.DB..::..Connector
The fourth connector to be connected to the cross.
Return Value
If creation was successful then an family instance to the new object is returned, and the transition fitting will be added at the connectors' end if necessary, otherwise an exception with failure information will be thrown.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentNullException | Thrown when the input argument connector1, connector2, connector3, or connector4 is nullNothingnullptra null reference (Nothing in Visual Basic). |
Autodesk.Revit.Exceptions..::..ArgumentException | Thrown when the connectors cannot be used for cross creation. For example, they cannot be from the same element, they must be of the same domain, and the owner of the connectors should be a (flex) duct or pipe. |
Autodesk.Revit.Exceptions..::..InvalidOperationException | Thrown when cross fitting cannot be created. |