Skip to content

Instantly share code, notes, and snippets.

@eirannejad
eirannejad / rps_init.py
Last active November 5, 2025 11:46
RevitPythonShell init
# these commands get executed in the current scope
# of each new shell (but not for canned commands)
#pylint: disable=all
import clr
clr.AddReferenceByPartialName('PresentationCore')
clr.AddReferenceByPartialName('AdWindows')
clr.AddReferenceByPartialName("PresentationFramework")
clr.AddReferenceByPartialName('System')
clr.AddReferenceByPartialName('System.Windows.Forms')