Create Method (Document, IList(ElementId), ElementId)


Creates a new instance of a Structural Connection Handler, which defines the connection between given elements. Elements should be of the following structural categories: framings, columns, walls, floors or foundations. The first of given elements is set as primary one.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.1090.0)
Since: 2017

Syntax

C#
public static StructuralConnectionHandler Create(
	Document document,
	IList<ElementId> idsToConnect,
	ElementId typeId
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	idsToConnect As IList(Of ElementId), _
	typeId As ElementId _
) As StructuralConnectionHandler
Visual C++
public:
static StructuralConnectionHandler^ Create(
	Document^ document, 
	IList<ElementId^>^ idsToConnect, 
	ElementId^ typeId
)

Parameters

document
Type: Autodesk.Revit.DB Document
The Revit document.
idsToConnect
Type: System.Collections.Generic IList ElementId
The ElementIdArr containing element id of connected elements.
typeId
Type: Autodesk.Revit.DB ElementId
The type of Structural Connection Handler.

Return Value

Returns created connection.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException This ElementIdArr is invalid. It should contain ids of the following structural categories: framings, columns, walls, floors or foundations. -or- The type typeId is not a valid StructuralConnectionHandlerType. -or- Missing detailed structural connection service implementation.
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.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →