Assign View Template to View from Excel list

I’ve built a graph that will create a View, assign a name to the View, and define a Title on Sheet parameter for the view. I would also like to assign a View Template to a View. The ApplyViewTemplate node from the Steam Package (v1.2.4) appears to serve that function. However, a View Template is not assigned when I run my graph. I believe I have the correct Data Types feeding the Inputs of the Node based on the Help Description of the Node. image|362x233 Project View List.xlsx (8.1 KB) Create View from Excel v2.0.dyn (39.3 KB)

Hey, I had a quick look…

Without a project file or any warnings, it’s hard to say for sure, but it all looks fine.

Obviously checking the name is exactly the same is a good idea.

You can also double-click into the custom node, copy the contents back into the main graph and likely get more info on the failure.

Otherwise, there is an alternative node in Archi-Lab, ‘Views.SetViewTemplate’ (which requires a view template not a name) perhaps try with that? This post shows couple of methods for getting all the view templates Issue with Custom Node Behaviour there is also a custom node in RIE.

Hope that’s useful,



Thanks for your quick reply. The thread you referenced is helpful. I tried to follow your suggestions.

First, I made sure the View Template name I was trying to use from the Excel list is an exact match to the name in Revit, which it is. So much for low hanging fruit.
Next, I looked at the content of the Steam Node that is not working.

There is a warning with one of the Nodes: Flatten Node error message
Do you know what “deprecated” means in the context of this warning?

On to Plan B since I don’t know how to diagnose this warning:
I wired up the SetViewTemplate node instead, and it failed also.
Set View Template Node Warning
The two inputs need a View Data Type. What is the difference between View and FloorPlanView? Do you have any suggestions about converting the View Template name from the Excel file to the actual View Template that the Input of the SetViewTemplate name requires? I am new to Dynamo, so I am trying to understand how to convert String data into different Data Types.

The reason the SetVT node failed was because you fed it the name (string) of the VT and it wants the actual View element (items with green number beside it in Dynamo). That is where the graph in the link comes in is to get the VT based on the name from all views.

1 Like


Good work for sticking with it!

Sean is right, unfortunately the warning is a little confusing and outputs all the inputs it received, not just the failing ones (you can see that string is the 2nd one listed). If you look Sean’s graph in the link you’ll see how to get the template by name.

The other warning in the custom node is telling you that you shouldn’t use the shorthand ‘Flatten’, but should use the full path ‘DSCore.List.Flatten’, which tells Dynamo 'go find the method flatten which lives in the Class List, inside the Library DSCore (a .dll file which is saved on your computer).

It is good to understand it, because if you use Node-to-Code you will often find that various package authors have used the same class name in their node and this is how you tell Dynamo which Library it should be using.

Incidentally, that is only a warning, the node should still run, so there is more likely an issue inside the python. If you copy the python node into your main graph you can wire it up and investigate further, if you wish.

Hopefully that’s of interest,


Edit: As a test, how about making a new view template by copying and pasting the name from your Excel into Revit and see if it accepts it? If not, it’s a different issue.

Hi Sean;
Thanks for your reply and suggestion. I’m trying to replicate the collection of nodes shown in the .jpeg you linked that will assign a View Template to a View. I think I understand the logic of creating a list of Views, filtering that list to only show View Templates, and then selecting only the View Template name that is fed into the = node. Unfortunately, it failed. I’m attaching my graph it its present status. I cannot produce a list of Views filtered to list only View Templates. There are several warnings.

This is the first warning. I tried to wire the IsViewTemplate node only to a Watch node, and I still got the Warning.
This is the second warning: image
This is the third warning:

This is the fourth warning:
Create View from Excel v2.0.dyn (51.4 KB)
Another issue that I see with the = node is that I need to feed the View Template name from the Excel file. I tried wiring the y port of the = node from the Excel file, and from a Code Block as the example shows. The warning at the = node appeared in both cases. I hope I am explaining clearly my desire to run all inputs from the Excel file. I want to run this graph on Dynamo Player with a single input of selecting the Excel file. If I am building a graph that won’t serve this purpose, or if this can’t be done through Dynamo Player, please let me know. I’m sorry I’m not understanding the process more quickly. I appreciate your example using OOTB nodes. For now this is the best approach with my inexperience. Python will have to come later.