Python Revit API Help

I’m struggling with modifying a node by Julien Benoit @jbenoit44

Element.GetFromLinkedFile fails to grab views if the linked file has view templates. This should be an easy one for someone with a better handle on the Revit API for filtering the Filtered Element Collector.

LinkDoc=IN[0] cat = IN[1] LinkInst = IN[2] BuiltIn = System.Enum.ToObject(BuiltInCategory, cat.Id) elementlist = [] typelist=[] T = [] collector = FilteredElementCollector(LinkDoc) filter = ElementCategoryFilter(BuiltIn) list=collector.WherePasses(filter).WhereElementIsNotElementType().ToElements()

Hi Timon,

You could check each view’s “IsTemplate” property and filter out the offenders. Tho it’s most likely the 3d view template that’s causing the failure:

2016-04-13_09-57-39

1 Like

Thank you for your help. Here is the final workflow

1 Like