Skip to content

Commit b9e086c

Browse files
authored
Merge pull request #128 from CyrilWaechter/patch-1
Fix set CollectorExt.m_app error
2 parents c51e5ad + 53651f6 commit b9e086c

File tree

1 file changed

+4
-1
lines changed
  • RevitPythonShell/DefaultConfig

1 file changed

+4
-1
lines changed

RevitPythonShell/DefaultConfig/init.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ def __init__(self, uiApplication):
6060
import RevitLookup
6161
self.RevitLookup = RevitLookup
6262
# See note in CollectorExt.cs in the RevitLookup source:
63-
self.RevitLookup.Snoop.CollectorExts.CollectorExt.m_app = uiApplication
63+
try:
64+
self.RevitLookup.Snoop.CollectorExts.CollectorExt.m_app = uiApplication
65+
except TypeError: # assigning m_app is now not required and even not possible
66+
pass
6467
self.revit = uiApplication
6568

6669
def lookup(self, element):

0 commit comments

Comments
 (0)