Looking to get this view setting in Graphic Display Options:
Shadows:
“Cast Shadows” toggle
Having a hard time finding it, is it accessible in Dynamo?
Thanks,
Jason
Looking to get this view setting in Graphic Display Options:
Shadows:
“Cast Shadows” toggle
Having a hard time finding it, is it accessible in Dynamo?
Thanks,
Jason
According to this post, this is not exposed in the Revit API, so it is not possible to do this through Dynamo (or through scripting in general). There is, however, the ability to control the intensity of the shadows, which can be reduced down to 0. I will give this a shot tomorrow to see if it achieves the same visual result.
Here is an example which takes a list of views as its input and sets the shadow intensity to 0. Visually, it is the same as turning off shadows:
import clr
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
views = IN[0]
# Ensure input is a list
if not isinstance(views, list):
views = UnwrapElement([views])
else:
views = UnwrapElement(views)
# Apply shadow intensity of 0 to each view
TransactionManager.Instance.EnsureInTransaction(doc)
for view in views:
view.ShadowIntensity = 0
TransactionManager.Instance.TransactionTaskDone()