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


Creates a new StructuralConnectionHandlerType object.

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

Syntax

C#
public static StructuralConnectionHandlerType Create(
	Document pADoc,
	string name,
	Guid guid,
	string familyName,
	ElementId categoryId
)
Visual Basic
Public Shared Function Create ( _
	pADoc As Document, _
	name As String, _
	guid As Guid, _
	familyName As String, _
	categoryId As ElementId _
) As StructuralConnectionHandlerType
Visual C++
public:
static StructuralConnectionHandlerType^ Create(
	Document^ pADoc, 
	String^ name, 
	Guid guid, 
	String^ familyName, 
	ElementId^ categoryId
)

Parameters

pADoc
Type: Autodesk.Revit.DB Document
The document.
name
Type: System String
The type name.
guid
Type: System Guid
Connection GUID.
familyName
Type: System String
Name of system family which created type will belong to.
categoryId
Type: Autodesk.Revit.DB ElementId
Category identity of connection type.

Return Value

The newly created instance.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
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

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →