PartUtils.DivideParts
Method
Description:
Creates divided parts out of parts.
Creates divided parts out of parts.
Syntax
public static PartMaker DivideParts(
Document document,
ICollection<ElementId> elementIdsToDivide,
ICollection<ElementId> intersectingReferenceIds,
IList<Curve> curveArray,
ElementId sketchPlaneId
)
Parameters
Parameter | Type | Description |
---|---|---|
document | Document | The document containing the parts. |
elementIdsToDivide | ICollection | The elements that will be divided. |
intersectingReferenceIds | ICollection | Intersecting references that will divide the elements. |
curveArray | IList | Array of curves that will divide the elements. |
sketchPlaneId | ElementId | SketchPlane id for the curves that divide the elements. |
Return Value
Type | Description |
---|---|
PartMaker | The newly created PartMaker. if no parts are divided. |
Exceptions
Exception | Condition |
---|---|
ArgumentException | One or more element ids was not permitted for dividing parts. Elements should be parts that are not yet divided and maximum distance from an original has not yet been reached. -or- One or more element ids was not permitted as intersecting references. Intersecting references should be levels, grids, or reference planes. -or- The element id should refer to a valid SketchPlane. -or- The input curveArray contains at least one helical curve and is not supported for this operation. -or- The input curveArray contains at least one NULL pointer and is not supported for this operation. |
ArgumentNullException | A non-optional argument was null |
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). |
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. |
ModificationOutsideTransactionException | The document has no open transaction. |