Set Phase Status Presentation with Python

You’ll need a reference to the Revit API if you don’t already have that, and then the script will return null because SetPhaseStatusPresentation is a void method so doesn’t return anything after it changes the status presentation. If you want to return something out of the node then you could return the phasefilter itself.

If you’re only going to be changing one phase filter at a time then you don’t need the loop in Python but I’ve left it in here for the time being

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

phasefilters = UnwrapElement(IN[0])

new = []

for phasefilter in phasefilters:
	phasefilter.SetPhaseStatusPresentation(ElementOnPhaseStatus.Temporary, PhaseStatusPresentation.DontShow)
	new.append(phasefilter)

OUT = new

Hope this helps,
Thomas

1 Like