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


Creates custom StructuralConnectionHandlerType and StructuralConnectionHandler.

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

Syntax

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

Parameters

document
Type: Autodesk.Revit.DBDocument
The Document.
elementIds
Type: System.Collections.GenericIListElementId
Elements which are to be used to create custom StructuralConnectionHandlerType.
typeName
Type: SystemString
The StructuralConnectionHandlerType name.

Return Value

The created StructuralConnectionHandler which is of just created custom StructuralConnectionHandlerType.

Remarks

Input Elements are deleted. All the input elements should be of the following structural categories:
  • FamilyInstance (structural beams and columns).
  • StructuralConnectionHandler elements associated to the connection.
  • Specific steel connection elements (bolts, anchors, plates, etc). These connection elements will be of type element but with categories related to structural connections, for example:
    • OST_StructConnectionWelds
    • OST_StructConnectionHoles
    • OST_StructConnectionModifiers
    • OST_StructConnectionShearStuds
    • OST_StructConnectionBolts
    • OST_StructConnectionAnchors
    • OST_StructConnectionPlates

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException All the input Elements should be of the following structural categories: framings, columns, profiles, plates, bolts, anchors, shear studs, welds or structural connections. -or- There must be at least one StructuralConnectionHandler among the input Elements. Total number of different input elements of input StructuralConnectionHandlers must be lower or equal to 3. -or- Name must be unique among other existing StructuralConnectionHandlerTypes and cannot contain invalid characters.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsModificationForbiddenException 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.ExceptionsModificationOutsideTransactionException The document has no open transaction.

See Also