# Set multiple templates to view, one after another

**URL:** <https://forum.dynamobim.com/t/set-multiple-templates-to-view-one-after-another/57191>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [November 12, 2020, 6:45pm UTC](https://forum.dynamobim.com/t/set-multiple-templates-to-view-one-after-another/57191 "2020-11-12T18:45:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerhard.p](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gerhard.p/32/147675_2.png) [@gerhard.p](https://forum.dynamobim.com/u/gerhard.p)\
**Post date:** [November 12, 2020, 6:45pm UTC](https://forum.dynamobim.com/t/set-multiple-templates-to-view-one-after-another/57191/1 "2020-11-12T18:45:25Z")

</div>

Hello Dynamo Community!  
This is my first post but it for sure won´t be the last one! I´m pretty new to Dynamo and Revit and i`m having fun experimenting and lerning. I´m having trouble with my first script and would appreciate your help.

Task:

1. find all views with specific view template
2. set new view template (e.g.: wall\_views\_filter)
3. set another view template (e.g.: wall\_views)

Reason:  
Our worklflow is to have a filter-template for our view types. For example, we have a wall\_views template and a corresponding wall\_views\_filter template. We first apply the \_filter template to our views and then the other template in wich filters are not “included”. So if i want to make changes to the \_filter template i would like to update all wall-views with the wall\_views\_filter template and set them back to wall\_views in a last step.

I found a script here in this forum that does part 1 and 2. But i can`t figure out how to set another view template after. Here is what i have so far.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/4/a441b68b17d37093127cef331da5ffe78ae9f832.png)

Thanks in advance!

Kind regards, Gerhard

---

<div class="post-metadata">

**Author:** ![Robert\_Younger](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/robert_younger/32/205603_2.png) [@Robert\_Younger](https://forum.dynamobim.com/u/Robert_Younger)\
**Post date:** [November 12, 2020, 6:52pm UTC](https://forum.dynamobim.com/t/set-multiple-templates-to-view-one-after-another/57191/2 "2020-11-12T18:52:11Z")

</div>

Welcome to the community!

The Views.SetViewTemplate node should pass the list of views through to the node output.  
What happens when you chain a second SetViewTemplate to the first?

---

<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:** [November 12, 2020, 7:20pm UTC](https://forum.dynamobim.com/t/set-multiple-templates-to-view-one-after-another/57191/3 "2020-11-12T19:20:08Z")

</div>

You may need to include separate transactions between applying each template.

---

<div class="post-metadata">

**Author:** ![gerhard.p](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gerhard.p/32/147675_2.png) [@gerhard.p](https://forum.dynamobim.com/u/gerhard.p)\
**Post date:** [November 12, 2020, 7:22pm UTC](https://forum.dynamobim.com/t/set-multiple-templates-to-view-one-after-another/57191/4 "2020-11-12T19:22:10Z")

</div>

Hy Robert, thank you!

If i make a second chain like this it skips the “test 2” template, and directly sets the template “test 3”. So it skips the template that would be my \_filter template, so no filters are applyed.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/3/d3f384bec543d419db7a1948026c73d5274a2b01.png)

---

<div class="post-metadata">

**Author:** ![gerhard.p](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gerhard.p/32/147675_2.png) [@gerhard.p](https://forum.dynamobim.com/u/gerhard.p)\
**Post date:** [November 12, 2020, 7:28pm UTC](https://forum.dynamobim.com/t/set-multiple-templates-to-view-one-after-another/57191/5 "2020-11-12T19:28:24Z")

</div>

Thanks Nick, but i have now idea how to do this. My result is a node output of one view, how to start a seperate transaction from there?

---

<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:** [November 12, 2020, 7:33pm UTC](https://forum.dynamobim.com/t/set-multiple-templates-to-view-one-after-another/57191/6 "2020-11-12T19:33:46Z")

</div>

There are nodes for this. You need to apply each template within a pair of Start/End Transaction nodes.

---

<div class="post-metadata">

**Author:** ![gerhard.p](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gerhard.p/32/147675_2.png) [@gerhard.p](https://forum.dynamobim.com/u/gerhard.p)\
**Post date:** [November 12, 2020, 8:01pm UTC](https://forum.dynamobim.com/t/set-multiple-templates-to-view-one-after-another/57191/7 "2020-11-12T20:01:03Z")

</div>

It´s working 😀 Thank you very much!

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/5/d5ee3f706b89dc06a08f96a8fba3d485304619c9.png)
