Dynamo list with filter to Excel

Me again… trying to make my life easier with dynamo.

I use to make a legend on specific sheets with the differents pipe accessories on the view.

I created a dynamo script to collect the “Comments” parameter for accessories on the active view.
My script works fine and I have a list at the end with all my component I want to put in my legend.

Where I’m stuck is to export this list to an excel file. Actually I managed to export to excel but it export ALL pipes accessories for the whole project.
How can I export ONLY the list I have from the active view?

Thanks for your help!

BV_Liste pipes acc comment in active view.dyn (29.6 KB)

This discussion might be of use to you.

Thanks JAC

I succed to have the list I wanted with only the informations i wanted.

Now, 2nd issue:
Frome the pipe accessories from my list, I would like to collect the Type name.
Any idea how to pick only thos elements and not from all the project?

Thanks BV_Liste pipes acc comment in active view.dyn (58.7 KB)