Revit 2025 API
Structural |
Creates a new instance of a Structural Connection Handler with a generic type, which defines the connection between given elements.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static StructuralConnectionHandler CreateGenericConnection( Document document, IList<ElementId> idsToConnect )
Public Shared Function CreateGenericConnection ( document As Document, idsToConnect As IList(Of ElementId) ) As StructuralConnectionHandler
public: static StructuralConnectionHandler^ CreateGenericConnection( Document^ document, IList<ElementId^>^ idsToConnect )
static member CreateGenericConnection : document : Document * idsToConnect : IList<ElementId> -> StructuralConnectionHandler
Parameters
- document Document
- The Revit document.
- idsToConnect IListElementId
- The list of element ids of connected elements.
Return Value
StructuralConnectionHandlerThe newly created generic connection.
| Exception | Condition |
|---|---|
| ArgumentException | It verifies that we have at least one element id in the list. |
| ArgumentNullException | A non-optional argument was null |
| 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). |
| 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. |
| ModificationOutsideTransactionException | The document has no open transaction. |
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.
A generic connection type will be created by default, if there is none present in the model.
See Also