# Incorrect View Templates Being Set

**URL:** <https://forum.dynamobim.com/t/incorrect-view-templates-being-set/9100>\
**Category:** Revit\
**Created:** [January 24, 2017, 1:15pm UTC](https://forum.dynamobim.com/t/incorrect-view-templates-being-set/9100 "2017-01-24T13:15:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nfuller-Stellar](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nfuller-stellar/32/20106_2.png) [@Nfuller-Stellar](https://forum.dynamobim.com/u/Nfuller-Stellar)\
**Post date:** [January 24, 2017, 1:15pm UTC](https://forum.dynamobim.com/t/incorrect-view-templates-being-set/9100/1 "2017-01-24T13:15:45Z")

</div>

I have created a fairly complicated script for creating floor plan views from an excel spreadsheet. The views are being created for the First Floor, Interstitial & Roof levels and each level has its own template. Additionally each trade in the excel spreadsheet has its own tab, i.e. HVAC, Utilities & Plumbing, each with their own view template. The result of the script will create over 160 views in less than a minute and save days of duplicating, naming, and cropping views manually. The only problem I’m having is getting the appropriate view template set for each view. It seems to be applying the last view template in the script to all views (the roof plan template). I can pretty quickly apply the correct view template manually to the resulting views in Revit but would really like to find the error. Any help would be greatly appreciated.

Nick

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

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [January 24, 2017, 1:38pm UTC](https://forum.dynamobim.com/t/incorrect-view-templates-being-set/9100/2 "2017-01-24T13:38:28Z")

</div>

Hi,

Try setting lacing to longest in the last SetParameterValuebyName node.

Marcel

---

<div class="post-metadata">

**Author:** ![Mostafa\_El\_Ayoubi](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mostafa_el_ayoubi/32/7815_2.png) [@Mostafa\_El\_Ayoubi](https://forum.dynamobim.com/u/Mostafa_El_Ayoubi)\
**Post date:** [January 24, 2017, 2:01pm UTC](https://forum.dynamobim.com/t/incorrect-view-templates-being-set/9100/3 "2017-01-24T14:01:52Z")

</div>

Hi @Nfuller-Stellar ,

2 things:  
1 - the inputs of the list combine node need to be in the same order as the function  
2 - the function shouldn’t receive any input directly

try this modification :

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/4/0401454e632f9c16767d1042e47a1762abb79f2f.jpg)

---

<div class="post-metadata">

**Author:** ![Nfuller-Stellar](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nfuller-stellar/32/20106_2.png) [@Nfuller-Stellar](https://forum.dynamobim.com/u/Nfuller-Stellar)\
**Post date:** [February 7, 2017, 7:19pm UTC](https://forum.dynamobim.com/t/incorrect-view-templates-being-set/9100/4 "2017-02-07T19:19:44Z")

</div>

So the solution to the View Template problem was as shown below. It is working through to the point of setting the View Templates. The next thing I’d like to be able to automate is the assignment of the Scope Boxes. I am aware that the Scope Box object is exposed to Dynamo, but what if the Scope Boxes already existed? It would seem a simple _Set Parameter_ function to tell the Views what Scope Box to use. The attached image is my attempt. Again the entirety of the script now works, all except the setting of the Scope Box parameter. Help!

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

---

<div class="post-metadata">

**Author:** ![rob.macdonald](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@rob.macdonald](https://forum.dynamobim.com/u/rob.macdonald)\
**Post date:** [July 6, 2017, 6:35pm UTC](https://forum.dynamobim.com/t/incorrect-view-templates-being-set/9100/5 "2017-07-06T18:35:44Z")

</div>

Hello I have been trying to get my similar script to work, I have had a look at yours for help. I can get mine to put the views into Revit but they are defaulting to last view template. I noticed you have a custom Node for the View Apply View Template please could you share with me this Node or show me how you made it as. Many thanks.

---

<div class="post-metadata">

**Author:** ![Konrad\_K\_Sobon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/konrad_k_sobon/32/8838_2.png) [@Konrad\_K\_Sobon](https://forum.dynamobim.com/u/Konrad_K_Sobon)\
**Post date:** [July 7, 2017, 2:33am UTC](https://forum.dynamobim.com/t/incorrect-view-templates-being-set/9100/6 "2017-07-07T02:33:29Z")

</div>

That;s from an Archi-lab package.

---

<div class="post-metadata">

**Author:** ![rob.macdonald](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@rob.macdonald](https://forum.dynamobim.com/u/rob.macdonald)\
**Post date:** [July 7, 2017, 4:02am UTC](https://forum.dynamobim.com/t/incorrect-view-templates-being-set/9100/7 "2017-07-07T04:02:11Z")

</div>

I have downloaded some nodes from Archi-lab but don’t seem to have this one will keep looking, thanks

---

<div class="post-metadata">

**Author:** ![rob.macdonald](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@rob.macdonald](https://forum.dynamobim.com/u/rob.macdonald)\
**Post date:** [July 7, 2017, 6:17am UTC](https://forum.dynamobim.com/t/incorrect-view-templates-being-set/9100/8 "2017-07-07T06:17:29Z")

</div>

Please help! Can’t seem to find the custom node View.ApplyViewTemplate.

---

<div class="post-metadata">

**Author:** ![Nfuller-Stellar](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nfuller-stellar/32/20106_2.png) [@Nfuller-Stellar](https://forum.dynamobim.com/u/Nfuller-Stellar)\
**Post date:** [July 7, 2017, 12:10pm UTC](https://forum.dynamobim.com/t/incorrect-view-templates-being-set/9100/9 "2017-07-07T12:10:51Z")

</div>

The View.ApplyViewTemplate node I used is from Steam Nodes  
 ![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/4/c/4cc80f795436e46212695f3468448119c24c3049.jpg)

> **[SteamNodes for Dynamo](https://aecuandme.wordpress.com/2014/11/07/steamnodes-for-dynamo/)**
>
> As promised, Here’s a all-in-one package available from package manager. Many nodes were shown in my RTC Europe class about Dynamo. I try to organize this collection as well as your toolbox c…
