Divide floors and beams into parts

Hello, Dear all:
I am working on splitting all walls, beams, and floors in my project. Here is my approach so far



I have read this very helpful postDividing parts with dynamo and completed dividing wall just fine. However, when I try to change the code to “beam” and “floor”(I only change “wall” to “beam” and “floor”), it did not work at all. With my almost to none python knowledge, I can’t figure it out.

2019-11-26_17-09-07
Thanks for all the help…
p.s. all the freeze nodes is the one I complete.