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