Hi,
Im fairly knew to python and the revit api.
I’m attempting to set an object transparent and halftone. The code below only sets the element to halftone. But if i comment out the halftone, it will set the element to transparent… Im not sure why it wont set both.
import clr
clr.AddReference('RevitAPI')
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.UI import *
app = __revit__.Application
doc = __revit__.ActiveUIDocument.Document
selection = [doc.GetElement(x) for x in uidoc.Selection.GetElementIds()]
t = Transaction(doc, 'transparenthalftone')
t.Start()
for i in selection:
doc.ActiveView.SetElementOverrides((i.Id),
OverrideGraphicSettings().SetSurfaceTransparency(100)
OverrideGraphicSettings().SetHalftone(True))
t.Commit()
__window__.Close()