Creates a new instance of a Structural Connection Handler, which defines the connection between given elements.
Namespace: Autodesk.Revit.DB.StructureAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2017
Syntax
C# |
---|
[ObsoleteAttribute("This method is deprecated in Revit 2021 and will be removed in the next version of Revit. We suggest you to use either CreateGenericConnection or other Create methods instead.")] public static StructuralConnectionHandler Create( Document document, IList<ElementId> idsToConnect ) |
Visual Basic |
---|
<ObsoleteAttribute("This method is deprecated in Revit 2021 and will be removed in the next version of Revit. We suggest you to use either CreateGenericConnection or other Create methods instead.")> _ Public Shared Function Create ( _ document As Document, _ idsToConnect As IList(Of ElementId) _ ) As StructuralConnectionHandler |
Visual C++ |
---|
[ObsoleteAttribute(L"This method is deprecated in Revit 2021 and will be removed in the next version of Revit. We suggest you to use either CreateGenericConnection or other Create methods instead.")] public: static StructuralConnectionHandler^ Create( Document^ document, IList<ElementId^>^ idsToConnect ) |
Parameters
- document
- Type: Autodesk.Revit.DB..::..Document
The Revit document.
- idsToConnect
- Type: System.Collections.Generic..::..IList<(Of <(<'ElementId>)>)>
List of element ids of connected elements.
Return Value
The newly created connection.
Remarks
Elements should be of the following structural categories: framings (OST_StructuralFraming), columns (OST_StructuralColumns), walls (OST_Walls), floors (OST_Floors) or foundations (OST_StructuralFoundations).
The first of given elements is set as the primary one.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | It verifies that we have at least one element id in the list. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions..::..InvalidOperationException | The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). |
Autodesk.Revit.Exceptions..::..ModificationForbiddenException | The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process. |
Autodesk.Revit.Exceptions..::..ModificationOutsideTransactionException | The document has no open transaction. |