Hi Guys,
have any of you goto any ideas how to get the view template as element of an 3D view? ive tryied everything but no luck ive also tryied the revitlookup table.
hope to hear from you guys
Hi Guys,
have any of you goto any ideas how to get the view template as element of an 3D view? ive tryied everything but no luck ive also tryied the revitlookup table.
hope to hear from you guys
Use the property accessor:
viewTemplateId = view.ViewTemplateId
templateElement = doc.GetElement(viewTemplateId)
Hi @wihibyusuf
I donât think it is possible to get a Dynamo 3D view of the ViewTemplate.
It is possible to get the API object for the viewTemplate. Dynamo constantly tries to wrap the API object to a Dynamo object (which results in a Null for 3D view templates)
This also returns a null for me, Dynamo tries to wrap the API 3D View into a Dynamo 3D view
yes thank you @Joelmick ive noticed the same thing. still im getting nulls
mee too also
Spring nodes implemented a node to collect all of them.
within his node he actually wrapped the 3d view templates himself:
import clr
clr.AddReference('RevitAPI')
import Autodesk.Revit.DB as DB
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)
ueWrapper = None
wrappers = clr.GetClrType(Revit.Elements.ElementWrapper).GetMethods()
for w in wrappers:
if w.ToString().startswith("Revit.Elements.UnknownElement"):
ueWrapper = w
break
fec = DB.FilteredElementCollector(doc).OfClass(DB.View3D)
OUT = []
for i in fec:
if i.IsTemplate:
OUT.append(ueWrapper.Invoke(None, (i, True) ))
Hi @john_pierson do you know if there is another similar node that works to get the templates associate at the 3D views inside the linked models in a project?
Thank you
Cheers
Hi @Alban_de_Chasteigner , thank you very much for your answer, but I would like to get the Template Name from my 3D view from the linked model like below:
GetParameterValueByName works only in the current document and not for the linked documents.
Thank you @Alban_de_Chasteigner , for your answer, yes you are right, but I have the same result with âView.ViewTemplateâ node from Clockwork, is there another note to do this task?
Hi @Alban_de_Chasteigner I figured out , itâs something funny, if in a 3D view a template is created from a 3D view I canât get it, but if the template came (from example) from floor plan view itâs worksâŚ
It has already been answered in posts 8 and 10.
Hi @Alban_de_Chasteigner excuse me but the object of the post is âGet view template of 3D viewâ, and I thoughts that is useful also for others that you can Get view template of 3D view, if the Template that is applyed is not generate from a 3D view. I hope that make sense.
Thank you for your time
Have a good day
Cheers
Sorry but thatâs not true now.
Dimitar Venkov found a solution, @john_pierson showed it in post 8.
I also integrated this method into a few nodes, see post 10 (crediting Dimitar into the custom nodes)
Hi @Alban_de_Chasteigner yes of course you are right, my problems it was to get the name of 3D view template applyed on the 3D view of linked files, I found another workaround with schedule view. Thanks