Rename multiple Revit views with excel

I was wondering if it is possible to make a script to rename multiple revit views reading the input of an excel file. So i started a little bit struggling making a script, i am quite new as dynamo user so i tried my best of making a proper script, the current script i have made is the following:

can somebody help me to make this script work or give some little advise where to find the problem? or is it just not possible to create a script like this?

Can you preview the output from the string.replace node?

sure, this is my output. Maybe it is because of the string replace reads out a codeblock node using “example” for replacing my View Names. When i want to rename a view and use a codeblock for input in the String.Replace node it works fine.

Seems to be working now though - all th views had their name set as per the results of that node. Or did I miss something?

Yes, it wont give me any errors but it wil only change the first view… (Dependent 1) it wil also start running and says that the runnen is complete.

I have also tried to flattern my itematindex to list of strings but also not working in Revit. I have tried this script with normal duplicated views, without any result.

Maybe the problem is at the setparameterbyname, i really dont know how to get this script working… When this script will be working it would be very time saving…

It might be because you’re supplying 57 views with only 14 names. Either way you need to get those lists to match.

@Nick_Boyts ty for your reply,

I already adjusted this with flattering my list at the itemindex to a list of strings what will result in a list of 57 views.

Also not giving any results…

So you now have 57 different views with 57 different names?

1 Like

That will be the strange part i dont have 57 views with different names. i think the graph must be a little bit adjusted somewhere but i dont know that place yet …

Also that 57 views dont have to get another name they will be simmilar like the v00, v01, v02 and v03 for 14 different type of houses. So that will be the 14 pre set names i would like to change in the view name parameter

I’m not sure I understand. You need the same number of names as views. Each view has to have its own name (unless you’re talking about title on sheet).