MEP rooms must be created from a linked Ifc file.
Unfortunately, the rooms are only created as DirectShape in the Generic Model in the link document.
The DirectShapes of the link document were filtered.
How can an MEP room be created from the existing bounding box of the DirectShape?
The method center of the bounding box with Space.ByPoint is not suitable (e.g. L-shaped room, elevator shaft in the stairwell).
Thanks a lot! The result looks very good!
Today the day comes to an end here (Central Europe), so tomorrow I will deal with the exact solution.
Finally an IFC specialist!
There are still many important Ifc topics, e.g. transfer of models for thermal calculations (importing multi-layer components with thermal properties for material …).
I hope to get more ideas and solutions in the future, but more on that later.
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:
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:
Import creates spaces, but leads to many other problems:
Rooms are not placed correctly, components are not on the axis and all sorts of other disturbing things happen.
I use the architecture model to create a model for thermal calculations.
If the architecture model changes regularly, a linked Ifc file is the better solution.
I tried running the script with the Python script that You posted. Unfortunately the result is an Empty List. Maybe You could point out what could be the problem?
I used the script Kulkul posted and used the script You provided in the Python node (as seen on the picture I posted earlier). But the Python node did not work and resulted in an empty list. What could be the problem with the Python script?