Set View Template for 3D Views

@dana.g Very interesting …
So I took a look at the code inside that node and it turns out Dynamo python nodes will output the names of 3d view templates but not the templates themselves…
image

so here’s a proposal for you @varunbose :
image
the dyn Change View Template_6 mod.dyn (26.1 KB)

I found a way to only display 3D view templates (maybe a dropdown would be more apporpriate than a listview input), here’s the code I used:

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import*
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument

tempnames = [v.Name for v in FilteredElementCollector(doc).OfClass(View).ToElements() if v.IsTemplate and v.ViewType == ViewType.ThreeD]
OUT = tempnames
4 Likes