This follows on from my other thread i made. (thanks again for the help! )
So i tried to get it working with multiple view inputs, which works to some extent.
i can get the fittings per view. 14 on the first view, 2 on the second. that’s correct.
Then i put in the code from the MEPOver package (@T_Pover), to find the connected elements and it comes out as the same number but in one list.
my question really is how do i get the duct output to match the fittings output?
i was thinking it should be be “for s in sfittings” not “for s in sfitting” but this gives an error about not having MEP connectors.
i tried changing the indents which gave some different results and adding a zip, but i could’nt get it to work either.
import clr #Import Revit Nodes clr.AddReference("RevitNodes") import Revit clr.ImportExtensions(Revit.Elements) # Import RevitAPI clr.AddReference("RevitAPI") import Autodesk from Autodesk.Revit.DB import * clr.AddReference('ProtoGeometry') from Autodesk.DesignScript.Geometry import * # Import DocumentManager and TransactionManager clr.AddReference("RevitServices") from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager clr.AddReference ("DSCoreNodes") import DSCore from DSCore import * doc = DocumentManager.Instance.CurrentDBDocument def tolist(obj): if isinstance(obj, list): return UnwrapElement(obj) else: return [UnwrapElement(obj)] views = tolist(IN) ducts =  sfittings =  sducts =  #collection filter FamilyInstance in view list for view in views: sfitting = [x for x in FilteredElementCollector(doc, view.Id).OfCategory(BuiltInCategory.OST_DuctFitting).ToElements() if "Shoe" in x.Symbol.FamilyName] sfittings.append(sfitting) for s in sfitting: connset = s.MEPModel.ConnectorManager.Connectors conn_pipes =  for c in connset: if c.IsConnected: for sc in c.AllRefs: conn_pipes.append(sc.Owner) sducts.append(conn_pipes) OUT = sfittings, sducts #OUT = List.Flatten(shoe_ducts,2), List.Flatten(taper_ducts,2)#,
could anyone offer any advice?