Hello,
I am tring to export the intersection point between walls from linked wall and pipes / ducts etc in my model. I have found a script on Dynamo Forum which I have tweaked and it works when i run it in revitpythonshell if walls and ducts are all in same model (ie, not linked model)
from Autodesk.Revit.DB.Mechanical import *
linked_walls = FilteredElementCollector(doc).OfClass(Wall)
ducts = FilteredElementCollector(doc).OfClass(Duct)
lstIntersect = []
opt = Options()
opt.ComputeReferences = True
opt.IncludeNonVisibleObjects = True
lstIntersect = []
for duct in ducts:
curvduct = duct.Location.Curve
for wall in linked_walls:
linkrefface = HostObjectUtils.GetSideFaces(wall, ShellLayerType.Interior)
intFace = wall.GetGeometryObjectFromReference(linkrefface[0])
interArRef = clr.Reference[IntersectionResultArray]()
if intFace.Intersect(curvduct, interArRef) == SetComparisonResult.Overlap:
pointIntersect = interArRef.Value[0].XYZPoint
print (pointIntersect)
my understanding is I need to transform the linked elements geometry for it it work with walls in the linked model.
I have found this post by searching Raybouncing in Pyrevit & unit conversion - #2 by Nicholas.Miles, but I can’t figure out how to transform wall geometry from linked model.
Could someone please help me by pointing me to teh right direction.
Thanks for your help in advance