AddCutBetweenSolids Method (Document, Element, Element)


Adds a solid-solid cut for the two elements.

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

Syntax

C#
public static void AddCutBetweenSolids(
	Document document,
	Element solidToBeCut,
	Element cuttingSolid
)
Visual Basic
Public Shared Sub AddCutBetweenSolids ( _
	document As Document, _
	solidToBeCut As Element, _
	cuttingSolid As Element _
)
Visual C++
public:
static void AddCutBetweenSolids(
	Document^ document, 
	Element^ solidToBeCut, 
	Element^ cuttingSolid
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The document containing the two elements.
solidToBeCut
Type: Autodesk.Revit.DBElement
The solid to be cut.
cuttingSolid
Type: Autodesk.Revit.DBElement
The cutting solid.

Remarks

This utility will split faces of cutting solid by default.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The element must be in a project document or in a conceptual model, pattern based curtain panel, or adaptive component family. -or- The element does not meet the condition that it must be solid and must be a GenericForm, GeomCombination, or a FamilyInstance.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException Failed to add solid-solid cut for the two elements.

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 →