Split Volumes Error

Hi! Why am I getting the following error?:

“Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last): File “”, line 30, in TypeError: expected Solid, got Solid”

I when executing this code inside dynamo using python script:

import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
from Autodesk.Revit.UI.Selection import *

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager

doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

solids = IN[0]
output=[]

for i in solids:
	output.append(SolidUtils.SplitVolumes(i))

OUT = output

Guessing you are providing a Dynamo solid, while the SolidUtils method is a Revit one. As such you need to convert the object from a Dynamo solid to a Revit one, or go to the root Revit element and pull the geometry from that.

How can I convert the object from a Dynamo solid to a Revit one?

In this image this geometry is being treated as one whole solid and I need to separate this into the five solids, is there a way to do that?

Hi @tiagofrbr try solid separate…

2 Likes

Thanks!