Cut in revit not the same as in dynamo

I try to make this
image

These are 2 generic models with an void in it.
In revit 2 times cut and join and it works.

In Dynamo it does not cut. The family has an void to make the cut. it works by hand. But want to use dynamo.
(something to do in the pythoncode AddCutBetweenSolids??)
With Element(s) cut its cuts the element without a void.


#Copyright (c) mostafa el ayoubi
#Data-Shapes 2016 elayoub.mostafa@gmail.com

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import*
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from Autodesk.Revit.DB.SolidSolidCutUtils import AddCutBetweenSolids

doc = DocumentManager.Instance.CurrentDBDocument

if isinstance(IN[0],list):
	tobecut = [UnwrapElement(i) for i in IN[0]]
else:
	tobecut = [UnwrapElement(IN[0])]
cutting = UnwrapElement(IN[1])
count = []
count2 = []

TransactionManager.Instance.EnsureInTransaction(doc)

for t in tobecut:
	try:
		count.append(AddCutBetweenSolids(doc,t,cutting))
	except:
		pass

TransactionManager.Instance.TransactionTaskDone()

OUT = '%d elements coupés' % (len(count))

Looking forward to get some hints.

Hi,

I’ve successfully used this one…
image

You can dig around in the node and look at the code :slight_smile:

It looks like you might want an ‘AddInstanceVoidCut’’ instead?

Hope that helps,

Mark

2 Likes

Hi @Mark.Ackerley

Thank you, the AddinstanceVoidCut is already in the script.

greeting Jan-Willem

1 Like

I’ve been trying to have this node work for me and it doesn’t. Not even on singular items. I am trying to cut a non-hosted door into a wall.
That way I can just spam-place the doors and let them cut later.

I have filtered the doors that already cut.