Element.Geometry operation failed on Rooms - PolyCurves may be branching

Hi Dynamo Users.

Im trying to create a script to get walls and rooms from a linked model and sort the walls with all of its sorrounding rooms.

In initial testing phase this worked fine, but when using it on an actual project I keep getting this error: PolyCurves may be Branching when trying to convert the Rooms to geometry to test intersection with walls.
I might have gone to fast with testing on a project way too large, but i just dont understand why it cant draw all rooms.

Furthermore i’m loosing a lot of walls when using Element.Geometry on them. Some/most of them are curtain walls, any idea on how to fix this?

Hi,

So for the room geometry, unfortunately Revit will allow complexity of room geometry that Dynamo just can’t handle (as a solid). From memory, if you use the room.boundary node, that is very robust? Perhaps you could creatively use that instead?

That polycurve error is, in my experience, related to lines (obvs a wall is a kind of line based element) where you get a Y kind of shape or 2 lines on top of each other and Dynamo doesn’t know which way to resolve it?

For your own interest, I would probably filter out those fails, grab a couple and select them in Revit to have a look at… Maybe you will find a consistent issue that you could find a work around with?

Hope that helps,

Mark

Hello Mark.

Thank you for the reply.
I will try with the room.boundary node to see if I happen to get better results.
Is this a way to get around the need to create the geometry in Dynamo?

Very large models tend to have a long execution time, and if i could remove the part of creating geometry and just compare the already created geometry in revit i would get a faster runtime (Maybe RevitAPI has some information stored about rooms and its bounding walls? I just dont understand C# very well, only Python to some extend)

Hey no worries!

I’m not 100% following your graph, but I think so… :slight_smile:

for boundarylist in item.GetBoundarySegments(options):
	for boundary in boundarylist:
		blist.append(boundary.Element)

Yeah, avoiding geometry will speed things up, though I always like to have the option of viewing the results in Dynamo to check for funnies… Perhaps that can be a frozen side branch just used for de-bugging?

Hope that helps,

Mark