Creating floors by room

I’m trying to create a routine to automatically create floors based on room type. The routine is all correct, the only error is that the “floor.ByOutlineTypeAndLevel” node does not accept the “List.Flatten” node as input. I saw other people’s models where this worked, but it doesn’t work on mine. Does anyone know how why this is happening? (I’m using the 2022 version of Revit)

Show all of the data entering the node please.

What @pyXam said + tell us what the error message says.

Warning: There is no version of Floor.ByOutlineTypeAndLevel that accepts this argument type(s) (double, Revit.Elements.FloorType, Revit.Elements.Level).

OK, that means that you’re feeding a number or numbers from the List.Flatten node.

You need to be feeding the input, “outlineCurves” with curves.

If you click on the word, “auto” on the ListFlatten node you’ll see a list of numbers.

You’ll see the Surface.Perimeter outputs the measurement of the perimeter as a double (number), rather than a geometry object. What you may want is Surface.PerimeterCurves, which will output the curves of a surface.

One thing that might be worth considering over your current method though is to use a node like Room.FinishBoundary or Room.CoreBoundary, which will output the curves of the room’s boundaries, saving you the trouble of having to process the geometry. I can’t remember if those nodes exist in that version of Dynamo or not, if it’s too old, then there are similar nodes in add-in packages like Clockwork and Archilab.

Not 100% sure that the ootb nodes handle multiple outlines per room, and you wont want to flatten them anyway as that would make one big floor vs one per room.

Try room.finishbounary fed straight into the floors.create node from Crumple package. It is built to receive and work with the output format of that node specifically.

I also designed it to receive one or many inputs for floor type/level, then it longest fille them for each room.

Exact same logic applies to my ceilings.create node. Too easy!

1 Like