Get Multiple Revit Link Elements

Hello,

I’m trying to collect all the Assemblies from multiple Revit Links. The problem is I’m only able to collect the elements from a single Revit link. When I try to include lacing into it, it still only collects from the single revit link.
See image below.
Any help on this would be great.

Try editing the Python Script inside that node and use it instead of the custom node (build in the lacing yourself).

Starting around Line 30…

LinkDocs=IN[0]
cat = IN[1]
LinkInsts = IN[2]

BuiltIn = System.Enum.ToObject(BuiltInCategory, cat.Id)

elementlist = []
typelist=[]
T = []

for i in range(0,len(LinkDocs)):
	LinkDoc=LinkDocs[i]
	LinkInst=LinkInsts[i]
	collector = FilteredElementCollector(LinkDoc)
	filter = ElementCategoryFilter(BuiltIn)
	list=collector.WherePasses(filter).WhereElementIsNotElementType().ToElements()
	elementlist.append(list)

OUT = elementlist

You could also try the collector from spring nodes:

1 Like

Thank you Ben & Dimitar both worked great!
I’m going to use Springs.Collector as is solves my next step getting the origin points of the links as well.

Also I think the original lacing was fine, but the identical ID’s through me off. Though re-evaluating this they will have the same ID as they are from the same Revit link, it’s only the Revit Link Instances that should have the different ID’s.
Either way, Spring Nodes it is.

Cheers,

Matt