DocumentNewElbowFitting Method |
Add a new family instance of an elbow fitting into the Autodesk Revit document,
using two connectors.
Namespace: Autodesk.Revit.CreationAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic FamilyInstance NewElbowFitting(
Connector connector1,
Connector connector2
)
Public Function NewElbowFitting (
connector1 As Connector,
connector2 As Connector
) As FamilyInstance
public:
FamilyInstance^ NewElbowFitting(
Connector^ connector1,
Connector^ connector2
)
member NewElbowFitting :
connector1 : Connector *
connector2 : Connector -> FamilyInstance
Parameters
- connector1 Connector
- The first connector to be connected to the elbow.
- connector2 Connector
- The second connector to be connected to the elbow.
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 connector2 is .
|
ArgumentException |
Thrown when the connectors cannot be used for the elbow creation. For example,
they cannot be from the same element, they must be of the same domain,
and the angle between them must fall within the valid range (typically 2 to 95 degrees).
|
InvalidOperationException |
Thrown when an elbow fitting cannot be created because the angle between the two connectors is too large or too small,
the connectors are not close enough together, or the connectors are placed at positions with too high of a tolerance.
|
See Also