# Rename multiple Revit views with excel

**URL:** <https://forum.dynamobim.com/t/rename-multiple-revit-views-with-excel/20288>\
**Category:** Revit\
**Tags:** revit, excel, dynamo\
**Created:** [March 21, 2018, 4:21pm UTC](https://forum.dynamobim.com/t/rename-multiple-revit-views-with-excel/20288 "2018-03-21T16:21:41Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThimoKoppers](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@ThimoKoppers](https://forum.dynamobim.com/u/ThimoKoppers)\
**Post date:** [March 21, 2018, 4:21pm UTC](https://forum.dynamobim.com/t/rename-multiple-revit-views-with-excel/20288/1 "2018-03-21T16:21:41Z")

</div>

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:

 ![dynamo%20script%20rename%20multiple%20views](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/4/44a3f9b04177af52d8eb9a326fd6f2dbb038f85e.JPG)

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?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [March 21, 2018, 8:52pm UTC](https://forum.dynamobim.com/t/rename-multiple-revit-views-with-excel/20288/2 "2018-03-21T20:52:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ThimoKoppers](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@ThimoKoppers](https://forum.dynamobim.com/u/ThimoKoppers)\
**Post date:** [March 22, 2018, 10:19am UTC](https://forum.dynamobim.com/t/rename-multiple-revit-views-with-excel/20288/3 "2018-03-22T10:19:50Z")

</div>

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.

 ![dynamo%20script%20rename%20multiple%20views%2C%20output%20string%20replace](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/0/c0b0b5f4e95e0c1a75ea42094d7ea50c47189cd0.JPG)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [March 22, 2018, 12:42pm UTC](https://forum.dynamobim.com/t/rename-multiple-revit-views-with-excel/20288/4 "2018-03-22T12:42:20Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ThimoKoppers](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@ThimoKoppers](https://forum.dynamobim.com/u/ThimoKoppers)\
**Post date:** [March 22, 2018, 2:38pm UTC](https://forum.dynamobim.com/t/rename-multiple-revit-views-with-excel/20288/5 "2018-03-22T14:38:09Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 22, 2018, 4:13pm UTC](https://forum.dynamobim.com/t/rename-multiple-revit-views-with-excel/20288/6 "2018-03-22T16:13:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ThimoKoppers](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@ThimoKoppers](https://forum.dynamobim.com/u/ThimoKoppers)\
**Post date:** [March 22, 2018, 4:29pm UTC](https://forum.dynamobim.com/t/rename-multiple-revit-views-with-excel/20288/7 "2018-03-22T16:29:08Z")

</div>

@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…

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 22, 2018, 4:40pm UTC](https://forum.dynamobim.com/t/rename-multiple-revit-views-with-excel/20288/8 "2018-03-22T16:40:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ThimoKoppers](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@ThimoKoppers](https://forum.dynamobim.com/u/ThimoKoppers)\
**Post date:** [March 22, 2018, 9:15pm UTC](https://forum.dynamobim.com/t/rename-multiple-revit-views-with-excel/20288/9 "2018-03-22T21:15:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 23, 2018, 3:32pm UTC](https://forum.dynamobim.com/t/rename-multiple-revit-views-with-excel/20288/10 "2018-03-23T15:32:37Z")

</div>

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).
