Accessing Visibility Control of Coordination Models in Revit 2022 with Dynamo

Hi All,

Is it possible to control visibility of Coordination Models in Revit with Dynamo? I have tried the below with no success.

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.

Many thanks if anyone can assist!

@JBH late reply, but worth posting:

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
3 Likes

@Elie.Trad Thanks so much!

I found another very clunky work around using view templates. The python solution works much better!

1 Like