Picking Views from a string

So i have made a program in dynamo with some help on here before.
I want to use the Bumblebee “Read.Excel” and get the views that are listed in the excel file.
For example, I have an excel file with “1-HVAC” in one of the colums and I want that to pull the “1-HVAC” view from the revit file.
I’ve gotten pretty close but cant quite seem to grasp it.
Its hard to put into words so if you have questions id be happy to answer them.
Any thoughts?

If I understand you correctly, you want to duplicate a view n times, and name the new views based on the spreadsheet ?

If so, iit is probably simpler than you have.

In the first part of your graph, you are trying to select all views and set the name parameter to the same value
Ie you don’t want setparameter

The first part would be just using a ‘views’ node to select the template view
Then feed that into the duplicate views node


Yeah so instead of the ‘views’ node i want to manually input the view i want from an excel sheet.
so for multiple views duplicated they can have different ‘views’ associated with them in the click of one button, rather than keep going back and changing the views node to a different view.

You can use Elements.FilterByName from clockwork

1 Like

So this works if i manually enter the view name as you have shown, it works. But when i use the Read Excel it does not but in another part of my program it works perfectly fine. does that not work with Read excel?

It should work with read Excel as well, a string is a string. If you paste a screenshot of the complete graph or attach a file it will be easier to help.

The Elements.FilterByName doesnt seem to recognize the list created by the Read Excel

This is the Excel File

What happens if you add a Flatten or Transpose after the read Excel node? Three might be a problem with the list structure.

Unfortunately neither of those worked either.

That is strange, this works for me (I used the OOTB excel node)

Here is another way to filter views by string:

In your second to last reply, what did your excel file look like to return what you got?

I didn’t save it, but it was just seven lines in sheet1 with the view names in the range A1:A7. Almost like yours.