Hi,
I’m looking for the node Elements.ByCategoryandView working with links. Does it exists or is there a work around?
Is it Get View Dependent Elements from Linked Documents?
No this doesn’t work. I am trying to get views out of the linked model and select models in that view. Like select elements in active view, but with links and categories.
No, I’m trying select view from linked model and also the elements inside that view. It should be working like Elements.ByCategoryAndView, but with links.
try this :
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import*
import System
from System.Collections.Generic import*
linkdoc = IN[0]
category = IN[1]
views = IN[2]
result = []
filter = ElementCategoryFilter(System.Enum.ToObject(BuiltInCategory,category.Id))
ids = [v.Id for v in views]
idlist = [ElementId(i) for i in ids]
for i in idlist:
result.append(FilteredElementCollector(linkdoc,i).WherePasses(filter).WhereElementIsNotElementType().ToElements())
OUT = result
all non OOTB nodes are from Archi lab
This solved my problem entirely. Thank you very much.


