I’ve even tried applying these settings to a view template and then applying view template properties to a view, this doesn’t even control this setting
The reason behind this struggle is that when a Coordination Model is linked into Revit this triggers Raster Processing when exporting views/sheets to PDF even when the Coordination Models are no longer loaded.
Which means the 400+ drawings that do not need to see the Coordination Model still print in Raster.
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
views = UnwrapElement(IN[0])
bool = IN[1]
TransactionManager.Instance.EnsureInTransaction(doc)
for view in views:
if bool == True:
view.AreCoordinationModelHandlesHidden = True
result = "Coordination models are hidden"
else:
view.AreCoordinationModelHandlesHidden = False
result = "Coordination models are visible"
TransactionManager.Instance.TransactionTaskDone()
OUT = result
Hi, it is posible to apply only to a current view, im trying but it doesn work.
Im leanring so, im not an expert coding, ill apreciate your help. Thanks
Hi, I’m currently new in python scripting and dynamo, and I tried doing this and I’m having still issue on the line 15. Let me know what I did wrong and I’m glad to learn from you
Convert views to a list. You are feeding it as a non-list. Use this line for views: views = UnwrapElement(IN[0]) if isinstance(IN[0], list) else [UnwrapElement(IN[0])]