anyone have solution? doesn’t work for both Dynamo node and Python node
try this, just getting the Name property. Remove it when accessing the template view itself.
OUT = [v.Name for v in FilteredElementCollector(doc).OfClass(View).WhereElementIsNotElementType() if v.IsTemplate]
thanks jshial, works great if only get name but 3D view template itself is still NULL, well, maybe i can get 3D view template via name?!
so my question now is can i get 3D view template via name?
thanks John for the insight, does it mean Revit API having same issue?
It’s a dynamo problem.
ok, does it mean Python Node in Dynamo environment can solve this problem if i understand correctly because Python coding is exactly the same as API?
You probably need to wrap downstream logic in the Python node as well.
what you are trying accomplish in the end? Mapping templates to views?
The id or Name of a template view could help you achieve it already. Apply template to any view will just require the Id of the template.
thanks jshial, i just want to get 3D view templates and delete or modify in Dynamo environment.
any hint how to wrap downstream logic in the Python node will be greatly appreciated.
@Ning_Zhou Deleting it should be pretty straightfoward, you just call Document.Delete(Id);
I haven’t tried to modify a view template programmatically but I guess it’s pretty much just like modifying a regular view, such as customizing visibility. the only difference is the template having a IsTemplate == True. There should be some good references in the forum.
well, i only want to get 3d view template, that’s it, the issue is you cannot get it, it’s null!
Use the Collect.View3DTemplates node of Springs package to solve this Dynamo issue.
Oh man. I didn’t even know about this node.
thanks Alban, i cannot find that node except
edit: found that node after i reinstalled latest version of spring nodes