SwitchJoinOrder Method


Reverses the order in which two elements are joined.

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

Syntax

C#
public static void SwitchJoinOrder(
	Document document,
	Element firstElement,
	Element secondElement
)
Visual Basic
Public Shared Sub SwitchJoinOrder ( _
	document As Document, _
	firstElement As Element, _
	secondElement As Element _
)
Visual C++
public:
static void SwitchJoinOrder(
	Document^ document, 
	Element^ firstElement, 
	Element^ secondElement
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The document containing the two elements.
firstElement
Type: Autodesk.Revit.DBElement
The first element.
secondElement
Type: Autodesk.Revit.DBElement
The second element. This element must be joined to the first element.

Remarks

The cutting element becomes the cut element and vice versa after the join order is switched. This functionality is not available for family documents.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException document is not a project document. -or- The element firstElement was not found in the given document. -or- The element secondElement was not found in the given document. -or- The elements are not joined. -or- The elements cannot be joined.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException Unable to switch the join order of these elements.

See Also