Enable temporary view properties

Hi All,

first off let me introduce myself, my name is shane and I have been drafting for 12 years, using Revit for the past 6 years and dynamo sporadically for 2 years.
I have created a very simple graph that turns on/off a selected category in all view templates in the project. I made this in order to quickly turn on/off reference planes in the view i am working in. I know i could create a specific view template and assign that to the view but i want to see if this can be done through Dynamo.

What i was trying to create in the graph was the ability to Enable the temporary view properties of the current view and turn the reference planes (or any category in the view template that i select) on/off with one run of the graph.
See attached my graph, any help from you Dynamo guru’s would be greatly appreciated.

Regards,
Shane

Ref%20planes%20on%20off

Anyone? is it even possible?

Shane

Bump!

Also to clarify after reading my initial post, i did not create this graph or the nodes. i merely put it together from another graph i have seen online. I believe most of the custom nodes were created by Konrad? Can anyone please let me know if this is even possible? i am going out of my mind trying to figure out a solution.

if temporary view properties cannot be accessed. i would be happy with a graph the selects a specified view template and then turns off a selected category in that view template?

Shane

Ok so i have kind of solved my own question.

i ran ‘View template’ straight into ‘view.setcategoryoverides’ and it worked a treat to turn off a selected category in a selected view template.
Capture6

i am Still interested to see if enable temp properties in current view and then toggle categories on off is possible?
apologies for all the posts!

Shane

1 Like

It sure is. I am working on putting together my first package. This will be one of my nodes but for now, have at it.

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

clr.AddReference("RevitServices")
import RevitServices

from RevitServices.Persistence import *
from RevitServices.Transactions import TransactionManager

Refresh = IN[0]
doc = DocumentManager.Instance.CurrentDBDocument
vId = UnwrapElement(doc.ActiveView.ToDSType(True))
#The inputs to this node will be stored as a list in the IN variables.
#vId = UnwrapElement(IN[0])
TransactionManager.Instance.EnsureInTransaction(doc)
doc.ActiveView.EnableTemporaryViewPropertiesMode(vId.Id)
TransactionManager.Instance.TransactionTaskDone()

#Assign your output to the OUT variable.
OUT = vId
2 Likes

Nice steven!

I look forward to using your new nodes package when available.

Shane