Skip to content

Instantly share code, notes, and snippets.

@gtalarico
Last active September 1, 2016 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gtalarico/9d369510c147638439553256851ffc06 to your computer and use it in GitHub Desktop.
Save gtalarico/9d369510c147638439553256851ffc06 to your computer and use it in GitHub Desktop.
RevitAPI::Code Snippets::Get Phase By Name
from Autodesk.Revit.DB import Phase, FilteredElementCollector
def get_phase_by_name(phase_name):
phase_collector = FilteredElementCollector(doc).OfClass(Phase)
for phase in phase_collector:
if phase.Name.Equals(phase_name):
return phase
phase = get_phase_by_name('01 - Existing')
print phase.Name
print phase.Id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment