Create a single merged part which represents the Parts
specified by partsToMerge.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
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<(Of <(<'ElementId>)>)>
The elements that the merged part will be created from.
Return Value
The newly created PartMaker. nullNothingnullptra 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. |