Create MEP spaces from linked IFC

Hi Kulkul,

it took some time to edit, but now the script is running!

Even Python for Get Levels from Level Names (my task from Kulkul :-)) is solved:

import clr

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

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

doc = DocumentManager.Instance.CurrentDBDocument

#Preparing input from dynamo to revit
names = IN[0]

#Do some action in a Transaction
levels = []

fec = FilteredElementCollector(doc).OfClass(Level).ToElements()

for l in fec:
	for n in names:
		if l.Name == n:
			levels.Add(l)
OUT = levels

Another question:
NormalVector

Normal vector (Z = -1): Direction of view for surfaces from the room to the outside?

Now I still have to label the rooms, but that’s sure to be easy.

I’ve only been with Dynamo for 4 weeks, so I’m a beginner.

Many thanks for the help.

So it works very well for the rooms in the example.

For rooms with complex geometry:
Room within a room (e.g. elevator in the stairwell) and
L-shaped rooms (center of the base is outside the room contour)
there are still problems:

The new test example:
https://we.tl/t-ZoYPxcbPfv

Best regards

Rolf