This is a really basic python question, but I don’t know much python, I just copy and past code bits.
I am trying to determine if elements are visible in views. I have a lovely python script I nabbed from a post by Jostein Olsen that does it for the active view. I wish to send a list of views to it and have it spit out the results in sublists by view (true/fales for each element in view 1, true/fales for each element in view 2, etc…). I have hacked it together to run the whole thing as a giant string, which i could technically do some list multiplication in dynamo to sort, but it would be much better if I could get it to spit out as sublists from the script. I tried an addition “for” but I am guessing I need a “while” with an index track (or there may be a more elegant way)? Any help would be appreciated. Thanks.
from Autodesk.Revit.DB import *
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
views = UnwrapElement(IN)
elements = UnwrapElement(IN)
listen = 
vlisten = 
for view in views:
for element in elements:
OUT = vlisten