Hey, i’ve been trying to get a Revit DB Document of a LinkInstance without any custom nodes or packages, and I found this topic that is marked as a solved, but it doesn’t seem to work for me and I don’t know why.
and this is how it works for me
Hey, i’ve been trying to get a Revit DB Document of a LinkInstance without any custom nodes or packages, and I found this topic that is marked as a solved, but it doesn’t seem to work for me and I don’t know why.
and this is how it works for me
Import RevitNodes so the Python intrepeter knows which assembly to call UnwrapElement()
from:
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
OUT=UnwrapElement(IN[0])[0].GetLinkDocument()
or add a firstitem node after the RevitLinkInstance or modify you script to process list.
this worked! so it tried to get linkDocument of a list, not an element in the list… that’s why Flattening didn’t help, thanks again for helping out!
I would like to get a list with sublist as well, not a single result