CreateMergedPart Method


Create a single merged part which represents the Parts specified by partsToMerge.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2013

Syntax

C#
public static PartMaker CreateMergedPart(
	Document document,
	ICollection<ElementId> partIds
)
Visual Basic
Public Shared Function CreateMergedPart ( _
	document As Document, _
	partIds As ICollection(Of ElementId) _
) As PartMaker
Visual C++
public:
static PartMaker^ CreateMergedPart(
	Document^ document, 
	ICollection<ElementId^>^ partIds
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document.
partIds
Type: System.Collections.Generic ICollection ElementId
The elements that the merged part will be created from.

Return Value

The newly created PartMaker. a null reference ( Nothing in Visual Basic) if no parts are merged.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException One or more element ids was not suitable for merging with the others. Specified elements should all be Parts, report the same material, creation and demolition phases, and have contiguous geometry.
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