Hello community,
I have been using the element.insert node for some time and just now realised that it seems to have started giving me way to many openings for some walls.
this is my current workflow:
Here is a visualisation of the wall i was searching openings for and the openings i found:
red is the actual wall (the thin white wall)
This is not a one of thing.
Happens in multiple projects with different kind of walls.
This is the construction of one of the walls:
sorry it is in german
translated construction
1 not bearing layer thickness 0,0125 m
2 non bearing layer thickness 0,0125m
4 bearing Thickness 0,06 m
What is the reason behind that?
Do you know a workaround?
I often find openings with rooms, but with this script here i use element.inserts because rooms are not modeled yet when it is needed.
Thank You for Your time.
This is the python code from the clockwork note:
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
items = UnwrapElement(IN[0])
incopenings = IN[1]
incshadows = IN[2]
incwalls = IN[3]
incshared = IN[4]
def GetInserts(item,incopenings,incshadows,incwalls,incshared):
# Regular host objects
if hasattr(item, "FindInserts"):
return [item.Document.GetElement(x) for x in item.FindInserts(incopenings,incshadows,incwalls,incshared)]
# Railings
elif hasattr(item, "GetAssociatedRailings"):
return [item.Document.GetElement(x) for x in item.GetAssociatedRailings()]
else: return []
if isinstance(IN[0], list): OUT = [GetInserts(x,incopenings,incshadows,incwalls,incshared) for x in items]
else: OUT = GetInserts(items,incopenings,incshadows,incwalls,incshared)```